Add a command for building the production image

This commit is contained in:
Oliver Davies 2021-07-03 23:01:48 +01:00
parent 1e66df30a1
commit abafacd4f9

View file

@ -8,6 +8,15 @@ command('disable'):
#!bash(workspace:/)
run docker-compose down
command('docker image build <git_commit>'):
env:
COMPOSE_PROJECT_NAME: = @('namespace')
GIT_COMMIT_SHA: = input.argument('git_commit')
exec: |
#!bash(workspace:/)
docker image build -f tools/docker/images/Dockerfile -t ${COMPOSE_PROJECT_NAME}-web:latest --target=nginx .
docker image build -f tools/docker/images/Dockerfile -t ${COMPOSE_PROJECT_NAME}-web:${GIT_COMMIT_SHA} --target=nginx .
command('enable'):
env:
COMPOSE_PROJECT_NAME: = @('namespace')