Browse Source

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

Zuul 5 months ago
parent
commit
4431661986
2 changed files with 4 additions and 2 deletions
  1. 3
    1
      Makefile
  2. 1
    1
      tools/drydock_image_build.sh

+ 3
- 1
Makefile View File

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

+ 1
- 1
tools/drydock_image_build.sh View File

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

Loading…
Cancel
Save