Added Docker build deploy scripts
This commit is contained in:
parent
d652ea7380
commit
a30002a7a0
@ -1,7 +1,8 @@
|
|||||||
stages:
|
stages:
|
||||||
- build-eleventy
|
- build-eleventy
|
||||||
|
- docker-build
|
||||||
build-eleventy:
|
build-eleventy:
|
||||||
stage: build-eleventy
|
stage: build
|
||||||
image: node:latest
|
image: node:latest
|
||||||
cache:
|
cache:
|
||||||
paths:
|
paths:
|
||||||
@ -14,3 +15,14 @@ build-eleventy:
|
|||||||
- _site/
|
- _site/
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
|
docker_build:
|
||||||
|
stage: build
|
||||||
|
script:
|
||||||
|
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
||||||
|
- docker build --pull -t $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG .
|
||||||
|
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
|
||||||
|
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG $CI_REGISTRY_IMAGE:latest
|
||||||
|
- docker push $CI_REGISTRY_IMAGE:latest
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
Loading…
Reference in New Issue
Block a user