Skip to content
Snippets Groups Projects
Commit 0807eabc authored by Fabien Forestier's avatar Fabien Forestier
Browse files

Adding build tag on jobs

parent 57cb1fa1
No related branches found
No related tags found
1 merge request!10Adding build tag on jobs
Pipeline #6902 passed
...@@ -7,6 +7,8 @@ variables: ...@@ -7,6 +7,8 @@ variables:
sonarqube: sonarqube:
stage: sonar-analysis stage: sonar-analysis
tags:
- build
only: only:
- master - master
before_script: before_script:
...@@ -25,19 +27,23 @@ sonarqube: ...@@ -25,19 +27,23 @@ sonarqube:
build_development: build_development:
stage: build stage: build
tags:
- build
only: only:
- development - development
script: script:
- export TAG=$CI_COMMIT_SHORT_SHA - export TAG=$CI_COMMIT_SHORT_SHA
- echo ${TAG} - echo ${TAG}
- export AUTHENTICATION_API_BIND_PORT=3002 - 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 login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker-compose push - 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: build_release:
stage: build stage: build
tags:
- build
only: only:
- tags - tags
script: script:
...@@ -46,4 +52,4 @@ build_release: ...@@ -46,4 +52,4 @@ build_release:
- export AUTHENTICATION_API_BIND_PORT=3002 - 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 login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker-compose push - docker-compose push
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment