Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Caroster
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Public
Caroster
Commits
ced5963f
Commit
ced5963f
authored
4 years ago
by
Tim Izzo
Committed by
Hadrien Froger
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Set CI for production
parent
5031f2a6
No related branches found
Branches containing commit
Tags
v0.1.0
Tags containing commit
1 merge request
!34
🏗 Set CI for production
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+17
-7
17 additions, 7 deletions
.gitlab-ci.yml
with
17 additions
and
7 deletions
.gitlab-ci.yml
+
17
−
7
View file @
ced5963f
...
...
@@ -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)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment