Skip to content

Commit bb3a4be

Browse files
committed
contrib: Better versioning when building the service image
Pipe the output of the git archive command to docker build to include the version context. It seemed better to stop using the makefile rather than add this specific use-case. Signed-off-by: crozzy <[email protected]>
1 parent d3655ee commit bb3a4be

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

contrib/openshift/build_and_deploy.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ set -exv
44
REPOSITORY="quay.io/app-sre"
55
IMAGE="${REPOSITORY}/clair"
66

7-
make container-build
7+
git archive HEAD|
8+
docker build -t clair-service:latest -
89

9-
GIT_HASH=`git rev-parse --short=7 HEAD`
1010
skopeo copy --dest-creds "${QUAY_USER}:${QUAY_TOKEN}" \
11-
"docker-daemon:clair-local:latest" \
11+
"docker-daemon:clair-service:latest" \
1212
"docker://${IMAGE}:latest"
1313

1414
skopeo copy --dest-creds "${QUAY_USER}:${QUAY_TOKEN}" \
15-
"docker-daemon:clair-local:latest" \
15+
"docker-daemon:clair-service:latest" \
1616
"docker://${IMAGE}:${GIT_HASH}"

0 commit comments

Comments
 (0)