File tree Expand file tree Collapse file tree 8 files changed +49
-17
lines changed
actions/certify-openshift-images Expand file tree Collapse file tree 8 files changed +49
-17
lines changed Original file line number Diff line number Diff line change 11name : ' certify-openshift-images'
22description : ' Push image to RedHat Connect for certification'
33inputs :
4+ registry :
5+ description : Name of the registry to certify from
6+ required : true
7+ default : " quay.io"
48 repository :
59 description : The name of repository of the image to be certified
610 required : true
711 version :
812 description : The version of the image to be certified
913 required : true
10- quay_password :
14+ registry_password :
1115 description : The password to access the quay.io registry
1216 required : true
1317 rhcc_token :
@@ -16,12 +20,18 @@ inputs:
1620 rhcc_project :
1721 description : The Redhat certification central project id
1822 required : true
23+ submit :
24+ description : Whether or not to submit the result of the preflight
25+ required : true
26+ default : false
1927runs :
2028 using : ' docker'
2129 image : ' Dockerfile'
2230 env :
31+ REGISTRY : ${{ inputs.registry }}
2332 REPOSITORY : ${{ inputs.repository }}
2433 VERSION : ${{ inputs.version }}
25- QUAY_PASSWORD : ${{ inputs.quay_password }}
34+ REGISTRY_PASSWORD : ${{ inputs.registry_password }}
2635 RHCC_TOKEN : ${{ inputs.rhcc_token }}
27- RHCC_PROJECT : ${{ inputs.rhcc_project }}
36+ RHCC_PROJECT : ${{ inputs.rhcc_project }}
37+ SUBMIT : ${{ inputs.submit }}
Original file line number Diff line number Diff line change 22
33set -eou pipefail
44
5- docker login -u mongodb+mongodb_atlas_kubernetes -p " ${QUAY_PASSWORD } " quay.io
5+ docker login -u mongodb+mongodb_atlas_kubernetes -p " ${REGISTRY_PASSWORD } " " ${REGISTRY} "
66
7- DIGESTS=$( docker manifest inspect " quay.io/${REPOSITORY} :${VERSION} " | jq -r ' .manifests[] | select(.platform.os!="unknown") | .digest' )
8- mapfile -t PLATFORMS < <( docker manifest inspect " quay.io/${REPOSITORY} :${VERSION} " | jq -r ' .manifests[] | select(.platform.os!="unknown") | .platform.architecture' )
7+ DIGESTS=$( docker manifest inspect " ${REGISTRY} /${REPOSITORY} :${VERSION} " | jq -r ' .manifests[] | select(.platform.os!="unknown") | .digest' )
8+ mapfile -t PLATFORMS < <( docker manifest inspect " ${REGISTRY} /${REPOSITORY} :${VERSION} " | jq -r ' .manifests[] | select(.platform.os!="unknown") | .platform.architecture' )
9+
10+ submit_flag=--submit
11+ if [ " ${SUBMIT} " == " false" ]; then
12+ submit_flag=
13+ fi
914
1015INDEX=0
1116for DIGEST in $DIGESTS ; do
1217 echo " Check and Submit result to RedHat Connect"
1318 # Send results to RedHat if preflight finished wthout errors
14- preflight check container " quay.io /${REPOSITORY} @${DIGEST} " \
19+ preflight check container " ${REGISTRY} /${REPOSITORY} @${DIGEST} " \
1520 --artifacts " ${DIGEST} " \
1621 --platform " ${PLATFORMS[$INDEX]} " \
1722 --pyxis-api-token=" ${RHCC_TOKEN} " \
1823 --certification-project-id=" ${RHCC_PROJECT} " \
1924 --docker-config=" ${HOME} /.docker/config.json" \
20- --submit
25+ ${submit_flag}
2126
2227 (( INDEX++ )) || true
2328done
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ concurrency:
2828 cancel-in-progress : true
2929jobs :
3030 e2e-tests :
31- name : Prepare E2E configuration and image
31+ name : Upgrade test on Openshift
3232 runs-on : ubuntu-latest
3333 if : ${{ vars.SKIP_OPENSHIFT != 'true' }}
3434 steps :
Original file line number Diff line number Diff line change @@ -66,11 +66,13 @@ jobs:
6666 - name : Certify Openshift images
6767 uses : ./.github/actions/certify-openshift-images
6868 with :
69- repository : quay.io/mongodb/mongodb-atlas-kubernetes-operator
69+ registry : quay.io
70+ registry_password : ${{ secrets.QUAY_PASSWORD }}
71+ repository : mongodb/mongodb-atlas-kubernetes-operator
7072 version : ${{ github.event.inputs.version }}
71- quay_password : ${{ secrets.QUAY_PASSWORD }}
7273 rhcc_token : ${{ secrets.RH_CERTIFICATION_PYXIS_API_TOKEN }}
7374 rhcc_project : ${{ secrets.RH_CERTIFICATION_OSPID }}
75+ submit : true
7476 - name : Configure certified release
7577 if : ${{ matrix.certified }}
7678 env :
Original file line number Diff line number Diff line change @@ -160,11 +160,13 @@ jobs:
160160 if : ${{ steps.tag.outputs.certify == 'true' }}
161161 uses : ./.github/actions/certify-openshift-images
162162 with :
163+ registry : quay.io
164+ registry_password : ${{ secrets.QUAY_PASSWORD }}
163165 repository : ${{ steps.tag.outputs.repo }}
164166 version : ${{ steps.tag.outputs.certified_version }}
165- quay_password : ${{ secrets.QUAY_PASSWORD }}
166167 rhcc_token : ${{ secrets.RH_CERTIFICATION_PYXIS_API_TOKEN }}
167168 rhcc_project : ${{ secrets.RH_CERTIFICATION_OSPID }}
169+ submit : true
168170 - name : Login to artifactory.corp.mongodb.com
169171 if : steps.check-signing-support.outputs.sign == 'true'
170172 uses : docker/login-action@v3
Original file line number Diff line number Diff line change 3131 name : Prepare E2E configuration and image
3232 runs-on : ubuntu-latest
3333 env :
34- GHCR_REPO : ghcr.io/ ${{ github.repository_owner }}/mongodb-atlas-kubernetes-operator-prerelease
34+ REPOSITORY : ${{ github.repository_owner }}/mongodb-atlas-kubernetes-operator-prerelease
3535 steps :
3636 - if : ${{ inputs.forked == false }}
3737 name : Check out code
@@ -56,12 +56,23 @@ jobs:
5656 - name : Build and Push image
5757 uses : ./.github/actions/build-push-image
5858 with :
59- repository : ${{ env.GHCR_REPO }}
59+ repository : ghcr.io/ ${{ env.REPOSITORY }}
6060 version : ${{ steps.prepare.outputs.tag }}
61- tags : ${{ env.GHCR_REPO }}:${{ steps.prepare.outputs.tag }}
61+ tags : ghcr.io/ ${{ env.REPOSITORY }}:${{ steps.prepare.outputs.tag }}
6262 platforms : linux/amd64
6363 push_to_docker : false
6464 forked : ${{ inputs.forked }}
65+ - name : Do preflight-check on test image
66+ uses : ./.github/actions/certify-openshift-images
67+ with :
68+ registry : ghcr.io
69+ registry_password : ${{ secrets.GITHUB_TOKEN }}
70+ repository : ${{ env.REPOSITORY }}
71+ version : ${{ steps.prepare.outputs.tag }}
72+ rhcc_token : ${{ secrets.RH_CERTIFICATION_PYXIS_API_TOKEN }}
73+ rhcc_project : ${{ secrets.RH_CERTIFICATION_OSPID }}
74+ submit : false
75+
6576 prepare-e2e-bundle :
6677 name : Prepare E2E Bundle configuration and image
6778 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ ENV TARGET_OS=${TARGETOS}
2828
2929RUN make manager
3030
31+ FROM registry.access.redhat.com/ubi9/ubi:9.2 as ubi-certs
3132FROM registry.access.redhat.com/ubi9/ubi-micro:9.2
3233
3334LABEL name="MongoDB Atlas Operator" \
@@ -46,7 +47,7 @@ LABEL name="MongoDB Atlas Operator" \
4647WORKDIR /
4748COPY --from=builder /workspace/bin/manager .
4849COPY hack/licenses licenses
49- COPY --from=builder /etc/ssl/certs/ ca-certificates.crt /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
50+ COPY --from=ubi-certs /etc/pki/ca-trust/extracted/pem/tls- ca-bundle.pem /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
5051
5152USER 1001:0
5253ENTRYPOINT ["/manager" ]
Original file line number Diff line number Diff line change 11# TODO: Eventually replace main Dockerfile
22FROM golang:1.22 as certs-source
33
4+ FROM registry.access.redhat.com/ubi9/ubi:9.2 as ubi-certs
45FROM registry.access.redhat.com/ubi9/ubi-micro:9.2
56
67ARG TARGETOS
@@ -23,7 +24,7 @@ LABEL name="MongoDB Atlas Operator" \
2324WORKDIR /
2425COPY bin/${TARGET_OS}/${TARGET_ARCH}/manager .
2526COPY hack/licenses licenses
26- COPY --from=certs-source /etc/ssl/certs/ ca-certificates.crt /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
27+ COPY --from=ubi-certs /etc/pki/ca-trust/extracted/pem/tls- ca-bundle.pem /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
2728
2829USER 1001:0
2930ENTRYPOINT ["/manager" ]
You can’t perform that action at this time.
0 commit comments