GitLab CI: only publish image on develop
This commit is contained in:
parent
06646a01df
commit
53be32de34
1 changed files with 5 additions and 4 deletions
|
@ -144,14 +144,15 @@ pages:
|
||||||
- develop
|
- develop
|
||||||
|
|
||||||
docker:
|
docker:
|
||||||
|
stage: deploy
|
||||||
image: docker:20.10.17
|
image: docker:20.10.17
|
||||||
services:
|
services:
|
||||||
- docker:20.10.17-dind
|
- docker:20.10.17-dind
|
||||||
# https://medium.com/devops-with-valentine/how-to-build-a-docker-image-and-push-it-to-the-gitlab-container-registry-from-a-gitlab-ci-pipeline-acac0d1f26df
|
# https://medium.com/devops-with-valentine/how-to-build-a-docker-image-and-push-it-to-the-gitlab-container-registry-from-a-gitlab-ci-pipeline-acac0d1f26df
|
||||||
script:
|
script:
|
||||||
- echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER $CI_REGISTRY --password-stdin
|
- echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER $CI_REGISTRY --password-stdin
|
||||||
- docker build -t $CI_REGISTRY_IMAGE .
|
- docker build -t $CI_REGISTRY_IMAGE .
|
||||||
- docker push $CI_REGISTRY_IMAGE
|
- docker push $CI_REGISTRY_IMAGE
|
||||||
# only:
|
only:
|
||||||
# refs:
|
refs:
|
||||||
# - develop
|
- develop
|
Loading…
Reference in a new issue