Added deploy section
This commit is contained in:
parent
4c5b30d4d7
commit
de34944469
@ -1,10 +1,11 @@
|
|||||||
variables:
|
variables:
|
||||||
IMAGE_TAG: $CI_REGISTRY_IMAGE:CI_COMMIT_SHORT_SHA
|
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
|
||||||
IMAGE_TAG_LATEST: $CI_REGISTRY_IMAGE:latest
|
IMAGE_TAG_LATEST: $CI_REGISTRY_IMAGE:latest
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- eleventy
|
- eleventy
|
||||||
- docker_build
|
- docker_build
|
||||||
|
- docker_deploy
|
||||||
|
|
||||||
eleventy:
|
eleventy:
|
||||||
stage: eleventy
|
stage: eleventy
|
||||||
@ -33,9 +34,18 @@ docker_build:
|
|||||||
- docker push $IMAGE_TAG
|
- docker push $IMAGE_TAG
|
||||||
- docker tag $IMAGE_TAG $IMAGE_TAG_LATEST
|
- docker tag $IMAGE_TAG $IMAGE_TAG_LATEST
|
||||||
- docker push $IMAGE_TAG_LATEST
|
- docker push $IMAGE_TAG_LATEST
|
||||||
- docker rmi $IMAGE_TAG $IMAGE_TAG_LATEST
|
only:
|
||||||
|
- tags
|
||||||
|
|
||||||
|
docker_deploy:
|
||||||
|
stage: docker_build
|
||||||
|
script:
|
||||||
|
- docker pull $IMAGE_TAG_LATEST
|
||||||
only:
|
only:
|
||||||
- tags
|
- tags
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user