From 7fe8e5ba16fb8f47d4446927d5bc6adf60b76832 Mon Sep 17 00:00:00 2001 From: Daniel_I_Am Date: Sat, 15 Aug 2020 20:18:35 -0400 Subject: [PATCH] Add tagging to docker step --- .gitlab-ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e8a6b3c..87ea11e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -93,7 +93,12 @@ docker: dependencies: - release 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:latest'