Skip to content

Commit

Permalink
certify-openshift-images/Dockerfile: bump preflight check version
Browse files Browse the repository at this point in the history
  • Loading branch information
s-urbaniak committed Mar 18, 2024
1 parent 169f682 commit 5a9272c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/actions/certify-openshift-images/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ RUN yum-config-manager --add-repo https://download.docker.com/linux/centos/docke

RUN yum clean all

RUN curl -LO https://github.com/redhat-openshift-ecosystem/openshift-preflight/releases/download/1.4.3/preflight-linux-amd64 && \
RUN curl -LO https://github.com/redhat-openshift-ecosystem/openshift-preflight/releases/download/1.9.1/preflight-linux-amd64 && \
chmod +x ./preflight-linux-amd64 && \
mv ./preflight-linux-amd64 /usr/local/bin/preflight

Expand Down
7 changes: 6 additions & 1 deletion .github/actions/certify-openshift-images/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
#!/bin/sh
#!/bin/bash

set -eou pipefail

docker login -u mongodb+mongodb_atlas_kubernetes -p "${QUAY_PASSWORD}" quay.io

DIGESTS=$(docker manifest inspect "quay.io/${REPOSITORY}:${VERSION}" | jq -r '.manifests[] | select(.platform.os!="unknown") | .digest')
mapfile -t PLATFORMS < <(docker manifest inspect "quay.io/${REPOSITORY}:${VERSION}" | jq -r '.manifests[] | select(.platform.os!="unknown") | .platform.architecture')

INDEX=0
for DIGEST in $DIGESTS; do
echo "Check and Submit result to RedHat Connect"
# Send results to RedHat if preflight finished wthout errors
preflight check container "quay.io/${REPOSITORY}@${DIGEST}" \
--artifacts "${DIGEST}" \
--platform "${PLATFORMS[$INDEX]}" \
--pyxis-api-token="${RHCC_TOKEN}" \
--certification-project-id="${RHCC_PROJECT}" \
--docker-config="${HOME}/.docker/config.json" \
--submit

let INDEX=${INDEX}+1
done

0 comments on commit 5a9272c

Please sign in to comment.