Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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

(( INDEX++ )) || true
done