Commit 29ac5b7f authored by Adam Mercer's avatar Adam Mercer

push to docker hub

parent 01304f4e
image: docker:latest
variables:
REPOSITORY: 'cgca/base'
stages:
- docker
- rebuild
......@@ -10,6 +13,12 @@ docker:build:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker build --pull -t $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME .
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
# push to Docker Hub
- docker logout $CI_REGISTRY
- docker login -u $DOCKER_HUB_USER -p $DOCKER_HUB_TOKEN
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME $REPOSITORY:$CI_COMMIT_REF_NAME
- docker push $REPOSITORY:$CI_COMMIT_REF_NAME
- docker logout
#
# trigger rebuilds of downstream containers
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment