Skip to content

Commit

Permalink
contrib: update build script to use podman
Browse files Browse the repository at this point in the history
There is an issue in the app-sre runners that mean skopeo is no longer
working due to the docker version being update and requiring a minimum
client version that the skopeo version in the runner doesn't have.

Signed-off-by: crozzy <joseph.crosland@gmail.com>
  • Loading branch information
crozzy committed Apr 16, 2024
1 parent 1006287 commit 4530b83
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions contrib/openshift/build_and_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,15 @@ set -exuo pipefail

: "${QUAY_USER:?Missing QUAY_USER variable.}"
: "${QUAY_TOKEN:?Missing QUAY_TOKEN variable.}"
: "${REPOSITORY:=quay.io/app-sre}"
: "${REGISTRY:=quay.io}"
: "${REPOSITORY:=${REGISTRY}/app-sre}"
: "${IMAGE:=${REPOSITORY}/clair}"
GIT_HASH="$(git rev-parse --short=7 HEAD)"

git archive HEAD |
docker build -t clair-service:latest -

skopeo copy --dest-creds "${QUAY_USER}:${QUAY_TOKEN}" \
"docker-daemon:clair-service:latest" \
"docker://${IMAGE}:latest"
podman login -u="${QUAY_USER}" -p="${QUAY_TOKEN}" "$(REGISTRY)"

skopeo copy --dest-creds "${QUAY_USER}:${QUAY_TOKEN}" \
"docker-daemon:clair-service:latest" \
"docker://${IMAGE}:${GIT_HASH}"
podman push clair-service:latest docker://${IMAGE}:latest
podman push clair-service:latest docker://${IMAGE}:${GIT_HASH}

0 comments on commit 4530b83

Please sign in to comment.