Test adding variables as job rules
This commit is contained in:
parent
3c94f70fe8
commit
ab9174a401
@ -36,7 +36,10 @@ stages:
|
||||
# Build the image
|
||||
- 'make build-container DOCKER_REPOSITORY=$REGISTRY_BASE_URL/$DOCKER_IMAGE_NAME DOCKER_TAG=$CI_COMMIT_SHA'
|
||||
rules:
|
||||
- if: '$CI_COMMIT_REF_PROTECTED == "true"'
|
||||
- if: '$REGISTRY_BASE_URL == ""'
|
||||
when: never
|
||||
- if: '$DOCKER_IMAGE_NAME == ""'
|
||||
when: never
|
||||
|
||||
"Publish Docker Image":
|
||||
image: docker:stable
|
||||
@ -54,4 +57,7 @@ stages:
|
||||
# Clean local image
|
||||
- 'docker image rm $REGISTRY_BASE_URL/$DOCKER_IMAGE_NAME:$CI_COMMIT_SHA'
|
||||
rules:
|
||||
- if: '$CI_COMMIT_REF_PROTECTED == "true"'
|
||||
- if: '$REGISTRY_BASE_URL == ""'
|
||||
when: never
|
||||
- if: '$DOCKER_IMAGE_NAME == ""'
|
||||
when: never
|
||||
|
||||
Loading…
Reference in New Issue
Block a user