Merge "Fix: adding back the possibility to add arbitrary labels"

This commit is contained in:
Zuul 2018-11-08 20:10:03 +00:00 committed by Gerrit Code Review
commit 4431661986
2 changed files with 4 additions and 2 deletions

View File

@ -22,7 +22,9 @@ PROXY ?= http://proxy.foo.com:8000
NO_PROXY ?= localhost,127.0.0.1,.svc.cluster.local
USE_PROXY ?= false
PUSH_IMAGE ?= false
COMMIT ?= commit-id
# use this variable for image labels added in internal build process
LABEL ?= org.airshipit.build=community
COMMIT ?= $(shell git rev-parse HEAD)
IMAGE ?= ${DOCKER_REGISTRY}/${IMAGE_PREFIX}/${IMAGE_NAME}:${IMAGE_TAG}
GO_BUILDER ?= docker.io/golang:1.10-stretch

View File

@ -22,7 +22,7 @@ then
ADDL_BUILD_ARGS="${ADDL_BUILD_ARGS}| --build-arg PIP_TRUSTED_HOST=${PIP_TRUSTED_HOST}"
fi
docker build --network host -t ${IMAGE} \
docker build --network host -t ${IMAGE} --label ${LABEL} \
--label org.opencontainers.image.revision=${COMMIT} \
--label org.opencontainers.image.created="$(date --rfc-3339=seconds --utc)" \
--label org.opencontainers.image.title=${IMAGE_NAME} \