Add tagging to docker step

This commit is contained in:
Daniel_I_Am 2020-08-15 20:18:35 -04:00
parent 9d5141130d
commit 7fe8e5ba16

View File

@ -93,7 +93,12 @@ docker:
dependencies: dependencies:
- release - release
script: script:
- 'docker -H unix:///var/run/docker.sock image build ./' # Build the image
- 'docker -H unix:///var/run/docker.sock image build -t chaosbot:$CI_COMMIT_SHA ./'
# Tag the image with a registry tag
- 'docker -H unix:///var/run/docker.sock image tag chaosbot:$CI_COMMIT_SHA registry.chaoticlogic.us/chaosbot:$CI_COMMIT_SHA'
- 'docker -H unix:///var/run/docker.sock image tag chaosbot:$CI_COMMIT_SHA registry.chaoticlogic.us/chaosbot:latest'
# Push the registry images
- 'docker -H unix:///var/run/docker.sock image push registry.chaoticlogic.us/chaosbot:$CI_COMMIT_SHA' - 'docker -H unix:///var/run/docker.sock image push registry.chaoticlogic.us/chaosbot:$CI_COMMIT_SHA'
- 'docker -H unix:///var/run/docker.sock image push registry.chaoticlogic.us/chaosbot:latest' - 'docker -H unix:///var/run/docker.sock image push registry.chaoticlogic.us/chaosbot:latest'