2022-01-26 17:32:33 +03:00
|
|
|
image: docker:latest
|
|
|
|
|
2022-01-26 13:38:37 +03:00
|
|
|
build:
|
|
|
|
stage: deploy
|
|
|
|
only:
|
2022-01-26 17:29:38 +03:00
|
|
|
- /^v.*$/
|
2022-01-26 17:26:48 +03:00
|
|
|
except:
|
|
|
|
- branches
|
2022-01-26 13:38:37 +03:00
|
|
|
services:
|
|
|
|
- docker:dind
|
|
|
|
before_script:
|
|
|
|
- echo "$CI_REGISTRY_PASSWORD" | docker login $CI_REGISTRY --username $CI_REGISTRY_USER --password-stdin
|
|
|
|
script:
|
2022-01-26 17:24:53 +03:00
|
|
|
- docker build --no-cache -t "$CI_REGISTRY_IMAGE:latest" -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG" .
|
2022-01-26 13:38:37 +03:00
|
|
|
- docker push "$CI_REGISTRY_IMAGE:latest"
|
|
|
|
- docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG"
|