@@ -38,13 +38,11 @@ variables:
3838 # Define the public staging registry
3939 STAGING_REGISTRY : ghcr.io/nvidia
4040 STAGING_VERSION : ${CI_COMMIT_SHORT_SHA}
41- ARTIFACTORY_REPO_BASE : " https://urm.nvidia.com/artifactory/sw-gpu-cloudnative"
4241 KITMAKER_RELEASE_FOLDER : " kitmaker"
4342 PACKAGE_ARCHIVE_RELEASE_FOLDER : " releases"
4443
4544stages :
4645 - pull
47- - scan
4846 - release
4947 - ngc-publish
5048
@@ -69,7 +67,7 @@ workflow:
6967# Download the regctl binary for use in the release steps
7068.regctl-setup :
7169 before_script :
72- - export REGCTL_VERSION=v0.4.5
70+ - export REGCTL_VERSION=v0.4.8
7371 - apk add --no-cache curl
7472 - mkdir -p bin
7573 - curl -sSLo bin/regctl https://github.com/regclient/regclient/releases/download/${REGCTL_VERSION}/regctl-linux-amd64
@@ -146,48 +144,11 @@ pull-images:
146144 script :
147145 - echo "Skipped in internal CI"
148146
149- # The .scan step forms the base of the image scan operation performed before releasing
150- # images.
151- scan-images :
152- stage : scan
153- needs :
154- - pull-images
155- image : " ${PULSE_IMAGE}"
156- parallel :
157- matrix :
158- PLATFORM : ["linux/amd64", "linux/arm64"]
159- variables :
160- IMAGE : " ${CI_REGISTRY_IMAGE}/k8s-dra-driver-gpu:${CI_COMMIT_SHORT_SHA}"
161- IMAGE_ARCHIVE : " k8s-dra-driver-gpu-${CI_JOB_ID}.tar"
162- allow_failure : true
163- script :
164- - |
165- docker login -u "${CI_REGISTRY_USER}" -p "${CI_REGISTRY_PASSWORD}" "${CI_REGISTRY}"
166- echo "Scanning image ${IMAGE} for ${PLATFORM}"
167- docker pull --platform="${PLATFORM}" "${IMAGE}"
168- docker save "${IMAGE}" -o "${IMAGE_ARCHIVE}"
169- AuthHeader=$(echo -n $SSA_CLIENT_ID:$SSA_CLIENT_SECRET | base64 -w0)
170- export SSA_TOKEN=$(curl --request POST --header "Authorization: Basic $AuthHeader" --header "Content-Type: application/x-www-form-urlencoded" ${SSA_ISSUER_URL} | jq ".access_token" | tr -d '"')
171- if [ -z "$SSA_TOKEN" ]; then exit 1; else echo "SSA_TOKEN set!"; fi
172-
173- pulse-cli -n $NSPECT_ID --ssa $SSA_TOKEN scan -i $IMAGE_ARCHIVE -p $CONTAINER_POLICY -o
174- rm -f "${IMAGE_ARCHIVE}"
175- artifacts :
176- when : always
177- expire_in : 1 week
178- paths :
179- - pulse-cli.log
180- - licenses.json
181- - sbom.json
182- - vulns.json
183- - policy_evaluation.json
184147
185148push-images-to-staging :
186149 extends :
187150 - .copy-images
188151 stage : release
189- needs :
190- - scan-images
191152 variables :
192153 IN_REGISTRY : " ${CI_REGISTRY}"
193154 IN_REGISTRY_USER : " ${CI_REGISTRY_USER}"
@@ -204,7 +165,6 @@ push-images-to-staging:
204165.publish-images :
205166 stage : ngc-publish
206167 needs :
207- - scan-images
208168 - push-images-to-staging
209169 image :
210170 name : " ${CNT_NGC_PUBLISH_IMAGE}"
@@ -254,15 +214,15 @@ push-images-to-staging:
254214 - " ${PROJECT_NAME}.yaml"
255215
256216
257- publish-images-to-ngc :
217+ create-ngc-publish-mr :
258218 extends :
259219 - .publish-images
260220 rules :
261221 - if : $CI_COMMIT_TAG
262222
263223# We create a dummy MR that exercises the publishing logic.
264224# TODO: This MR should be closed automatically.
265- publish-images -dummy :
225+ create-ngc- publish-mr -dummy :
266226 extends :
267227 - .publish-images
268228 variables :
0 commit comments