2017 © Pedro Peláez
 

library gitlab-client

a client to build gitlab repositories

image

seretos/gitlab-client

a client to build gitlab repositories

  • Thursday, February 16, 2017
  • by Seretos
  • Repository
  • 1 Watchers
  • 0 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 0 % Grown

The README.md

gitlab-client

Build Status Coverage Status, (*1)

this package provide two console commands to automate creation of releases/tags with gitlab, (*2)

Installation

globally install the phar:, (*3)

wget https://github.com/Seretos/gitlab-client/releases/download/v0.1.2/gitlab-client.phar
chmod +x gitlab-client.phar
sudo mv gitlab-client.phar /usr/local/bin/gitlab-client

or add the require to your composer project:, (*4)

composer require seretos/gitlab-client

Usage

if globally installed:, (*5)

gitlab-client list

or on composer installation:, (*6)

php vendor\bin\gitlab-client list

build:child command

example:, (*7)

gitlab-client build:child --server-url http://your.gitlab.api/api/v3/ --auth-token yourUserToken --repository yourRepositoryName --branch yourBranch

this command create new branches/tags from the given branch name., (*8)

for example. if you execute this command with the branch master, the command show which branches exists. if a branch 0 exists, the command generate a new branch 1 from master. if 1 exists, the command create the branch with name 2 and so on. if you execute this command with branch 1,2 or some one else single numeric branch, the command generate a new branch like 1.0,0.2. if you execute the command from an branch like 1.0, the command create a tag named v1.0.0 or v1.0.1..., (*9)

protect:branch command:

example:, (*10)

gitlab-client protect:branch --server-url http://your.gitlab.api/api/v3/ --auth-token yourUserToken --repository yourRepositoryName --branch yourBranch

this command set the given branch to protected., (*11)

coverage:check command:

example:, (*12)

phpunit --bootstrap vendor/autoload.php --configuration phpunit.xml.dist --coverage-clover build/logs/clover.xml
gitlab-client coverage:check --clover-file path/to/your/clover.xml --percentage 100

this command checks, that the code coverage is greater then the given percentage., (*13)

copy:members command:

gitlab-client copy:members --server-url http://your.gitlab.api/api/v3/ --auth-token yourUserToken --source-group yourSourceGroup --destination-group yourDestinationGroup

this command add all users which found in the source group, but not exist in the destination group, (*14)

replace:readme command:

this command search for the following regex /\?branch\=([\d\w.-]*)/ in the readme.md of your repository-branch and change it to ?branch=yourBranch, (*15)

gitlab-client replace:readme --server-url http://your.gitlab.api/api/v3/ --auth-token yourUserToken --repository yourRepositoryName --branch yourBranch

example usage in gitlab-ci.yml:

test:
    script:
        - phpunit --bootstrap vendor/autoload.php --configuration phpunit.xml.dist --coverage-clover build/logs/clover.xml
        - gitlab-client coverage:check --clover-file path/to/your/clover.xml --percentage 100
        - gitlab-client replace:readme --server-url http://$CI_SERVER_NAME/api/v3/ --auth-token yourToken --repository $CI_PROJECT_NAME --branch $CI_BUILD_REF_NAME
release:
    script:
        - gitlab-client protect:branch --server-url http://$CI_SERVER_NAME/api/v3/ --auth-token yourToken --repository $CI_PROJECT_NAME --branch $CI_BUILD_REF_NAME
        - gitlab-client build:child --server-url http://$CI_SERVER_NAME/api/v3/ --auth-token yourToken --repository $CI_PROJECT_NAME --branch $CI_BUILD_REF_NAME
    only:
        - /^(master|\d+(.\d+)?)$/

The Versions

16/02 2017

dev-master

9999999-dev

a client to build gitlab repositories

  Sources   Download

MIT

The Requires

 

The Development Requires

by Arne von Appen

16/02 2017

v0.1.5

0.1.5.0

a client to build gitlab repositories

  Sources   Download

MIT

The Requires

 

The Development Requires

by Arne von Appen

16/02 2017

v0.1.4

0.1.4.0

a client to build gitlab repositories

  Sources   Download

MIT

The Requires

 

The Development Requires

by Arne von Appen

23/01 2017

v0.1.3

0.1.3.0

a client to build gitlab repositories

  Sources   Download

MIT

The Requires

 

The Development Requires

by Arne von Appen

09/01 2017

v0.1.2

0.1.2.0

a client to build gitlab repositories

  Sources   Download

MIT

The Requires

 

The Development Requires

by Arne von Appen

09/01 2017

v0.1.1

0.1.1.0

a client to build gitlab repositories

  Sources   Download

MIT

The Requires

 

The Development Requires

by Arne von Appen

08/01 2017

v0.1.0

0.1.0.0

a client to build gitlab repositories

  Sources   Download

MIT

The Requires

 

The Development Requires

by Arne von Appen

08/01 2017

v0.0.0

0.0.0.0

a client to build gitlab repositories

  Sources   Download

MIT

The Requires

 

The Development Requires

by Arne von Appen