From 0807eabccf20bf1e29e8c913ea506b7c6c1bf76f Mon Sep 17 00:00:00 2001 From: Fabien Forestier <fforestier@deb-sat-test-2.neogeo.local> Date: Tue, 25 Aug 2020 16:54:07 +0200 Subject: [PATCH] Adding build tag on jobs --- .gitlab-ci.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 79181ce..c108b35 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,6 +7,8 @@ variables: sonarqube: stage: sonar-analysis + tags: + - build only: - master before_script: @@ -25,19 +27,23 @@ sonarqube: build_development: stage: build + tags: + - build only: - development script: - export TAG=$CI_COMMIT_SHORT_SHA - echo ${TAG} - export AUTHENTICATION_API_BIND_PORT=3002 - - docker-compose build + - docker-compose build - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - docker-compose push - - "curl -X POST -F token=$CI_JOB_TOKEN -F ref=master -F variables[TAG]=${TAG} https://forge.grandlyon.com/api/v4/projects/321/trigger/pipeline" + - 'curl -X POST -F token=$CI_JOB_TOKEN -F ref=master -F variables[TAG]=${TAG} https://forge.grandlyon.com/api/v4/projects/321/trigger/pipeline' build_release: stage: build + tags: + - build only: - tags script: @@ -46,4 +52,4 @@ build_release: - export AUTHENTICATION_API_BIND_PORT=3002 - docker-compose build - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - - docker-compose push \ No newline at end of file + - docker-compose push -- GitLab