Commit 7270a8e3 authored by David Foucher's avatar David Foucher

Add possibility tag alha or beta version for gitlab-ci

parent d4ce8e44
Pipeline #2588 passed with stages
in 10 minutes and 9 seconds
...@@ -29,7 +29,7 @@ api publish: ...@@ -29,7 +29,7 @@ api publish:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context ${CI_PROJECT_DIR}/docker --dockerfile $CI_PROJECT_DIR/docker/dockerfile_trefle --build-arg TREFLE_VERSION=$CI_COMMIT_TAG --build-arg TREFLE_GIT=${CI_PROJECT_URL} --destination ${CI_REGISTRY_IMAGE}:${CI_COMMIT_TAG} - /kaniko/executor --context ${CI_PROJECT_DIR}/docker --dockerfile $CI_PROJECT_DIR/docker/dockerfile_trefle --build-arg TREFLE_VERSION=$CI_COMMIT_TAG --build-arg TREFLE_GIT=${CI_PROJECT_URL} --destination ${CI_REGISTRY_IMAGE}:${CI_COMMIT_TAG}
only: only:
- /^api-v[0-9.]+$/ - /^api-v[0-9.ab]+$/
- /^testing$/ - /^testing$/
deploy API to staging: deploy API to staging:
...@@ -49,7 +49,7 @@ deploy API to staging: ...@@ -49,7 +49,7 @@ deploy API to staging:
script: script:
- ssh gitlab@${STAGING_SERVEUR_IP} "cd /home/docker && VERSION=${CI_COMMIT_TAG} /bin/bash update.sh trefle && echo \"VERSION=${CI_COMMIT_TAG}\" | tee -a update.log >> .env" - ssh gitlab@${STAGING_SERVEUR_IP} "cd /home/docker && VERSION=${CI_COMMIT_TAG} /bin/bash update.sh trefle && echo \"VERSION=${CI_COMMIT_TAG}\" | tee -a update.log >> .env"
only: only:
- /^api-v[0-9.]+$/ - /^api-v[0-9.ab]+$/
- /^testing$/ - /^testing$/
backoffice publish: backoffice publish:
...@@ -61,7 +61,7 @@ backoffice publish: ...@@ -61,7 +61,7 @@ backoffice publish:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context ${CI_PROJECT_DIR}/docker --dockerfile ${CI_PROJECT_DIR}/docker/dockerfile_web --build-arg TREFLE_BACK_VERSION=${CI_COMMIT_TAG} --build-arg TREFLE_OLD_VERSION=${TREFLE_OLD_VERSION} --build-arg TREFLE_GIT=${CI_PROJECT_URL} --destination ${CI_REGISTRY_IMAGE}:${CI_COMMIT_TAG} - /kaniko/executor --context ${CI_PROJECT_DIR}/docker --dockerfile ${CI_PROJECT_DIR}/docker/dockerfile_web --build-arg TREFLE_BACK_VERSION=${CI_COMMIT_TAG} --build-arg TREFLE_OLD_VERSION=${TREFLE_OLD_VERSION} --build-arg TREFLE_GIT=${CI_PROJECT_URL} --destination ${CI_REGISTRY_IMAGE}:${CI_COMMIT_TAG}
only: only:
- /^backoffice-v[0-9.]+$/ - /^backoffice-v[0-9.ab]+$/
deploy Backoffice to staging: deploy Backoffice to staging:
type: deploy type: deploy
...@@ -80,5 +80,5 @@ deploy Backoffice to staging: ...@@ -80,5 +80,5 @@ deploy Backoffice to staging:
script: script:
- ssh gitlab@${STAGING_SERVEUR_IP} "cd /home/docker && BACK_VERSION=${CI_COMMIT_TAG} docker-compose up -d --no-deps web && echo \"BACK_VERSION=${CI_COMMIT_TAG}\" | tee -a .env >> update.log" - ssh gitlab@${STAGING_SERVEUR_IP} "cd /home/docker && BACK_VERSION=${CI_COMMIT_TAG} docker-compose up -d --no-deps web && echo \"BACK_VERSION=${CI_COMMIT_TAG}\" | tee -a .env >> update.log"
only: only:
- /^backoffice-v[0-9.]+$/ - /^backoffice-v[0-9.ab]+$/
- /^testing$/ - /^testing$/
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment