updated cicd

This commit is contained in:
Solomon Laing 2021-08-24 20:40:35 +09:30
parent 2a2bb6f3b9
commit cfa1876032

View File

@ -4,11 +4,12 @@ stages:
- build
- push
- deploy
before_script:
- echo -n $CI_REGISTRY_TOKEN | docker login -u "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY
.before_script
before_script:
- echo -n $CI_REGISTRY_TOKEN | docker login -u "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY
build:
extends: .before_script
stage: build
tags:
- docker
@ -19,6 +20,7 @@ build:
# Tag the "master" branch as "latest"
push latest:
extends: .before_script
stage: push
tags:
- docker
@ -31,6 +33,7 @@ push latest:
# Docker tag any Git tag
push tag:
extends: .before_script
stage: push
tags:
- docker
@ -43,6 +46,7 @@ push tag:
# Docker Deploy
# deploy:
# extends: .before_script
# stage: deploy
# tags:
# - docker
@ -62,8 +66,6 @@ push tag:
deploy:
stage: deploy
bofore_script:
- ''
image:
name: alpine/helm:latest
entrypoint: [""]
@ -73,6 +75,6 @@ deploy:
--wait
--set image.tag=${CI_COMMIT_SHA}
simple-blog-api-${CI_COMMIT_REF_SLUG}
devops
devops/simple-blog-api
environment:
name: production