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