Last active
January 16, 2017 22:41
-
-
Save BenHall/7a44bd716c7eb243cf4ecccd06141774 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
variables: | |
IMAGE_NAME: https://HOST2_SUBDOMAIN-80-KATACODA_HOST.environments.katacoda.com/root/front-end | |
TAG: $CI_BUILD_ID | |
stages: | |
- build | |
- push | |
- cleanup | |
build_production: | |
stage: build | |
script: | |
- docker build -t $IMAGE_NAME:$TAG . | |
only: | |
- master | |
push_production: | |
stage: build | |
script: | |
- docker push $IMAGE_NAME:$TAG | |
only: | |
- master | |
cleanup_production: | |
stage: cleanup | |
script: | |
- docker rmi $( docker images | grep '<none>' | tr -s ' ' | cut -d ' ' -f 3) | |
only: | |
- master | |
allow_failure: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment