Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Docker
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SmartDataLab
public
CI-CD components
Docker
Commits
ca4cb984
Commit
ca4cb984
authored
3 years ago
by
Pierre Smeyers
Committed by
Cédric OLIVIER
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Enforce AUTODEPLOY_TO_PROD and PUBLISH_ON_PROD as boolean variables
parent
c432e7c5
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
templates/gitlab-ci-docker.yml
+3
-4
3 additions, 4 deletions
templates/gitlab-ci-docker.yml
with
3 additions
and
4 deletions
templates/gitlab-ci-docker.yml
+
3
−
4
View file @
ca4cb984
...
...
@@ -689,13 +689,12 @@ docker-publish:
-
if
:
'
$CI_COMMIT_REF_NAME
!~
$PROD_REF'
when
:
never
# exclude if $PUBLISH_ON_PROD disabled
-
if
:
'
$PUBLISH_ON_PROD
=
=
"
false"
||
$PUBLISH_ON_PROD
==
"no"
||
$PUBLISH_ON_PROD
==
"
"'
-
if
:
'
$PUBLISH_ON_PROD
!
=
"
true
"'
when
:
never
# exclude if snapshot is same as release image
-
if
:
'
$DOCKER_SNAPSHOT_IMAGE
==
$DOCKER_RELEASE_IMAGE'
when
:
never
# if $AUTODEPLOY_TO_PROD: auto
-
if
:
$AUTODEPLOY_TO_PROD
-
if
:
'
$AUTODEPLOY_TO_PROD
==
"true"'
# else: manual + blocking
-
if
:
$PUBLISH_ON_PROD
# this 'if' is useless but only prevents GitLab warning :(
when
:
manual
-
when
:
manual
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