If you want to use this command without docker you can fetch the binary as below
docker create --name gitlab-utils itscaro/gitlab-utils
docker cp gitlab-utils:/app/cli ./cli
docker rm -f gitlab-utils
This command calls Gitlab API to get changes and apply labels if it finds any matching rules in label.yml
You need a Gitlab token and a configuration file mounted at /app/label.yml inside the container.
label.ymlBACK:
- cli/**/*
- src/**/*
CONFIG:
- config/**/*
.gitlab-ci.ymlstages:
- label
label:
stage: label
script:
- docker run --rm -e GITLAB_ENDPOINT=$CI_API_V4_URL -e GITLAB_TOKEN=<Token to access Gitlab API> -v "$(pwd)/label.yml:/app/label.yml" itscaro/gitlab-utils label -p $CI_PROJECT_PATH -i $CI_MERGE_REQUEST_IID
only:
- merge_requests
This command is useful to release assets
You need a Gitlab token and mount the file to upload inside the container.
.gitlab-ci.ymlstages:
- release
label:
stage: release
script:
- docker run --rm -e GITLAB_ENDPOINT=$CI_API_V4_URL -e GITLAB_TOKEN=<Token to access Gitlab API> -v "$(pwd)/build/binary:/tmp/binary" itscaro/gitlab-utils upload -p $CI_PROJECT_PATH -i /tmp/binary
only:
refs:
- tags
Content type
Image
Digest
Size
13.3 MB
Last updated
about 7 years ago
docker pull itscaro/gitlab-labeler