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 <[email protected]>
  • Loading branch information
crozzy committed Apr 16, 2024
1 parent 1006287 commit c2742cf
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 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 -
podman 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 c2742cf

Please sign in to comment.