Add a command to pull the latest Docker images

This commit is contained in:
Oliver Davies 2021-07-05 20:14:18 +01:00
parent 0565c659fd
commit f0fecc0aab

View file

@ -20,6 +20,15 @@ command('docker image build <git_commit>'):
run docker image build -f tools/docker/images/Dockerfile --target=production -t @('docker.repository'):${GIT_COMMIT_SHA} .
run docker image build -f tools/docker/images/Dockerfile --target=production -t @('docker.repository'):latest .
command('docker image pull <git_commit>'):
env:
COMPOSE_PROJECT_NAME: = @('namespace')
GIT_COMMIT_SHA: = input.argument('git_commit')
exec: |
#!bash(workspace:/)|@
run docker image pull @('docker.repository'):${GIT_COMMIT_SHA}
run docker image pull @('docker.repository'):latest
command('docker image push <git_commit>'):
env:
COMPOSE_PROJECT_NAME: = @('namespace')