Skip to content
Snippets Groups Projects
Commit ced5963f authored by Tim Izzo's avatar Tim Izzo :deer: Committed by Hadrien Froger
Browse files

:construction_site: Set CI for production

parent 5031f2a6
No related branches found
Tags v0.1.0
1 merge request!34🏗 Set CI for production
......@@ -82,18 +82,28 @@ Deploy to Staging:
- if: "$CI_COMMIT_TAG =~ /v.*-rc$/"
# CI variables:
# - STRAPI_CHART_VERSION: Version du chart Strapi à utiliser
# - ENV_URL [scopée]: URL de l'environnement (requis)
# - ENV_CONFIG [scopée]: Fichier de configuration values.yaml (requis)
# - ENV_NAMESPACE [scopée]: Namespace Kubernetes (default: default)
# - JELASTIC_HOSTER: nom de domaine de l'API Jelastic (requis)
# - JELASTIC_PASSWORD: Mot de passe pour l'API Jelastic (requis)
# - JELASTIC_LOGIN: Nom d'utilisateur pour l'API Jelastic (requis)
# - JELASTIC_ENVNAME: Nom de l'environnement ciblé (requis)
# - JELASTIC_NODEID: Node ID du container à déployer dans l'environnement (requis)
# - USE_EXISTING_VOLUME: Indique s'il faut garder les volumes déclarés ou non
Deploy to Production:
extends: .deploy
stage: deploy
environment:
name: production
url: $ENV_URL
rules:
- if: "$CI_COMMIT_TAG =~ /v.*[^r][^c]$/"
when: manual
# rules:
# - if: "$CI_COMMIT_TAG =~ /v.*[^r][^c]$/"
# when: manual
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}
# CI variables:
# - SONAR_URL: URL de SonarQube (requis)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment