Add tags to docker on release
This commit is contained in:
parent
d33fd4d43d
commit
c5b9b7e640
@ -1,3 +1,11 @@
|
|||||||
|
stages:
|
||||||
|
- build
|
||||||
|
- test
|
||||||
|
- deploy
|
||||||
|
- release
|
||||||
|
|
||||||
|
variables:
|
||||||
|
DOCKER_TAG: $CI_COMMIT_TAG
|
||||||
build:
|
build:
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
@ -15,3 +23,12 @@ deploy:
|
|||||||
- docker push tandrade/short:latest
|
- docker push tandrade/short:latest
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
|
release:
|
||||||
|
before_script:
|
||||||
|
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD"
|
||||||
|
stage: release
|
||||||
|
script:
|
||||||
|
- docker tag short-build tandrade/short:$DOCKER_TAG
|
||||||
|
- docker push tandrade/short:$DOCKER_TAG
|
||||||
|
only:
|
||||||
|
- tags
|
Loading…
x
Reference in New Issue
Block a user