From 4531149ea9cb42bdfaa11129e859399b28737715 Mon Sep 17 00:00:00 2001 From: Sergiusz Urbaniak Date: Mon, 18 Mar 2024 14:12:40 +0100 Subject: [PATCH] certify-openshift-images/Dockerfile: bump preflight check version --- .github/actions/certify-openshift-images/Dockerfile | 2 +- .github/actions/certify-openshift-images/entrypoint.sh | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/actions/certify-openshift-images/Dockerfile b/.github/actions/certify-openshift-images/Dockerfile index 8e65cfecbb..5ddd6bf418 100644 --- a/.github/actions/certify-openshift-images/Dockerfile +++ b/.github/actions/certify-openshift-images/Dockerfile @@ -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 diff --git a/.github/actions/certify-openshift-images/entrypoint.sh b/.github/actions/certify-openshift-images/entrypoint.sh index cc3b4bd4b3..e402e678b8 100644 --- a/.github/actions/certify-openshift-images/entrypoint.sh +++ b/.github/actions/certify-openshift-images/entrypoint.sh @@ -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') +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