Skip to content
Snippets Groups Projects
Commit 5a88369a authored by Tim Izzo's avatar Tim Izzo :deer:
Browse files

:construction_worker: Set pipeline for production on tags

parent 8c23fd0a
Branches
Tags v0.2.0
1 merge request!73👷 Set pipeline for production on tags
......@@ -31,6 +31,7 @@ Build:
image: docker:stable-git
rules:
- if: '$CI_COMMIT_REF_NAME == "master"'
- if: '$CI_COMMIT_TAG =~ /v.*$/'
script:
- docker login $CI_REGISTRY -u $CI_REGISTRY_USER -p$CI_REGISTRY_PASSWORD
- docker pull $CI_REGISTRY_IMAGE:latest || true
......@@ -94,13 +95,9 @@ Deploy to Production:
environment:
name: production
url: $ENV_URL
# rules:
# - if: "$CI_COMMIT_TAG =~ /v.*[^r][^c]$/"
# when: manual
rules:
- if: "$CI_COMMIT_TAG =~ /v.*[^r][^c]$/"
image: mwienk/jelastic-cli
when: manual
variables:
CI_COMMIT_TAG: latest # Avant de mettre en place le système de tag, on redéploie toujours le tag latest
script:
- /root/jelastic/users/authentication/signin --login $JELASTIC_LOGIN --password $JELASTIC_PASSWORD --platformUrl ${JELASTIC_HOSTER:-app.hidora.com}
- /root/jelastic/environment/control/redeploycontainerbyid --envName $JELASTIC_ENVNAME --nodeId $JELASTIC_NODEID --tag ${CI_COMMIT_TAG:-$CI_COMMIT_SHORT_SHA} --useExistingVolumes ${USE_EXISTING_VOLUME:-true}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment