Added new vailables from gitlab-ci.yml
This commit is contained in:
parent
fded12a15b
commit
ebeb6d7eda
@ -1,6 +1,11 @@
|
|||||||
|
variables:
|
||||||
|
- IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
|
||||||
|
- IMAGE_TAG_LATEST: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- build-eleventy
|
- build-eleventy
|
||||||
- docker-build
|
- docker-build
|
||||||
|
|
||||||
build-eleventy:
|
build-eleventy:
|
||||||
stage: build-eleventy
|
stage: build-eleventy
|
||||||
image: node:latest
|
image: node:latest
|
||||||
@ -16,17 +21,16 @@ build-eleventy:
|
|||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
|
docker-build:
|
||||||
services:
|
services:
|
||||||
- docker:dind
|
- docker:dind
|
||||||
|
|
||||||
docker-build:
|
|
||||||
stage: docker-build
|
stage: docker-build
|
||||||
image: docker:latest
|
image: docker:latest
|
||||||
script:
|
script:
|
||||||
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
||||||
- docker build --pull -t $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG .
|
- docker build --pull -t $IMAGE_TAG .
|
||||||
- docker push $CI_REGISTRY/$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
|
- docker push $IMAGE_TAG
|
||||||
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG $CI_REGISTRY_IMAGE:latest
|
- docker tag $IMAGE_TAG $IMAGE_TAG_LATEST
|
||||||
- docker push $CI_REGISTRY/$CI_REGISTRY_IMAGE:latest
|
- docker push $IMAGE_TAG_LATEST
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
|
Loading…
Reference in New Issue
Block a user