Gitlab CI: docker image rename + add commit id tag

This commit is contained in:
Loïc Blot 2018-12-12 09:47:32 +01:00 committed by GitHub
parent 3bfb8284b8
commit 1a51455b9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -318,6 +318,7 @@ package:docker:
before_script: before_script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com
script: script:
- docker build . -t ${CONTAINER_IMAGE}/minetestserver:$CI_COMMIT_REF_NAME -t ${CONTAINER_IMAGE}/minetestserver:latest - docker build . -t ${CONTAINER_IMAGE}/server:$CI_COMMIT_SHA -t ${CONTAINER_IMAGE}/server:$CI_COMMIT_REF_NAME -t ${CONTAINER_IMAGE}/server:latest
- docker push ${CONTAINER_IMAGE}/minetestserver:$CI_COMMIT_REF_NAME - docker push ${CONTAINER_IMAGE}/server:$CI_COMMIT_SHA
- docker push ${CONTAINER_IMAGE}/minetestserver:latest - docker push ${CONTAINER_IMAGE}/server:$CI_COMMIT_REF_NAME
- docker push ${CONTAINER_IMAGE}/server:latest