@@ -34,6 +34,7 @@ variables:
3434 # Define the public staging registry
3535 STAGING_REGISTRY : ghcr.io/nvidia
3636 STAGING_VERSION : " ${CI_COMMIT_SHORT_SHA}"
37+ PUBLISH_VERSIONS : 535.261.03
3738
3839.image-pull-rules :
3940 # We delay the job start to allow the public pipeline to generate the required images.
@@ -217,6 +218,18 @@ image-rhel9:
217218 - if : $CI_PIPELINE_SOURCE == "merge_request_event"
218219 - !reference [.pipeline-trigger-rules, rules]
219220
221+ .scan-ubuntu20.04 :
222+ # Repeat for each DRIVER_VERSION
223+ extends :
224+ - .driver-versions-ubuntu20.04
225+ - .scan-generic
226+ rules :
227+ - !reference [.scan-rules-common, rules]
228+ - if : $CI_PIPELINE_SOURCE == "schedule"
229+ when : never
230+ - if : $CI_PIPELINE_SOURCE == "merge_request_event"
231+ - !reference [.pipeline-trigger-rules, rules]
232+
220233.scan-ubuntu22.04 :
221234 # Repeat for each DRIVER_VERSION
222235 extends :
@@ -268,15 +281,15 @@ image-rhel9:
268281# Define the scan targets
269282scan-ubuntu20.04-amd64 :
270283 extends :
271- - .scan
284+ - .scan-ubuntu20.04
272285 - .dist-ubuntu20.04
273286 - .platform-amd64
274287 needs :
275288 - image-ubuntu20.04
276289
277290scan-ubuntu20.04-arm64 :
278291 extends :
279- - .scan
292+ - .scan-ubuntu20.04
280293 - .dist-ubuntu20.04
281294 - .platform-arm64
282295 needs :
@@ -369,19 +382,13 @@ scan-rhel9-arm64:
369382 OUT_REGISTRY_USER : " ${NGC_REGISTRY_USER}"
370383 OUT_REGISTRY_TOKEN : " ${NGC_REGISTRY_TOKEN}"
371384 OUT_REGISTRY : " ${NGC_REGISTRY}"
385+ OUT_IMAGE_NAME : " ${NGC_STAGING_REGISTRY}/driver"
372386
373387# Define the external release helpers
374388.release:ngc :
375389 extends :
376390 - .release:external
377391 - .release:ngc-variables
378- script :
379- - |
380- if [[ -n "${OUT_VERSION}" ]]; then
381- echo "${CI_COMMIT_SHORT_SHA}-${DRIVER_VERSION}-${DIST} ${OUT_VERSION}-${DRIVER_VERSION}-${OUT_DIST}" > build-info-${DRIVER_VERSION}-${OUT_DIST}.txt
382- else
383- echo "${CI_COMMIT_SHORT_SHA}-${DRIVER_VERSION}-${DIST} ${DRIVER_VERSION}-${OUT_DIST}" > build-info-${DRIVER_VERSION}-${OUT_DIST}.txt
384- fi
385392
386393release:ngc-ubuntu20.04 :
387394 extends :
@@ -495,139 +502,95 @@ release:ngc-rhel9.6:
495502 variables :
496503 OUT_DIST : " rhel9.6"
497504
498- .process -build-info :
505+ generate -build-info :
499506 stage : ngc-publish
500- allow_failure : true
507+ artifacts :
508+ paths :
509+ - build-info/${CI_PIPELINE_ID}-full.txt
501510 script :
502511 - |
503- distributions="ubuntu20.04 ubuntu22.04 ubuntu24.04 rhel8 rhcos4.12 rhcos4.13 rhcos4.14 rhcos4.15 rhcos4.16 rhcos4.17 rhcos4.18 rhel8.8 rhel8.10"
504- > combined-build-info.txt
505- for dist in $distributions; do
506- for driver_version in ${DRIVER_VERSIONS}; do
507- if [ -f "build-info-${driver_version}-${dist}.txt" ]; then
508- cat "build-info-${driver_version}-${dist}.txt" >> combined-build-info.txt
509- fi
512+ for DRIVER_VERSION in ${PUBLISH_VERSIONS}; do
513+ for file in build-info/${CI_PIPELINE_ID}-${DRIVER_VERSION}-*; do
514+ cat "$file" >> build-info/${CI_PIPELINE_ID}-full.txt
510515 done
511516 done
512- # Verify we have data
513- if [ ! -s combined-build-info.txt ]; then
514- echo "Error: No build information was collected"
517+ if [ ! -s "build-info/${CI_PIPELINE_ID}-full.txt" ]; then
518+ echo "Error: No build information was collected from the release jobs"
515519 exit 1
516520 fi
517- artifacts :
518- paths :
519- - combined-build-info.txt
520521
521- process-build-info-release :
522- extends :
523- - .process-build-info
524- rules :
525- - if : $CI_COMMIT_TAG
526- needs :
527- - job : release:ngc-ubuntu20.04
528- optional : true
529- - job : release:ngc-ubuntu22.04
530- optional : true
531- - job : release:ngc-ubuntu24.04
532- optional : true
533- - job : release:ngc-rhel8.8
534- optional : true
535- - job : release:ngc-rhel8.10
536- optional : true
537- - job : release:ngc-rhcos4.12
538- optional : true
539- - job : release:ngc-rhcos4.13
540- optional : true
541- - job : release:ngc-rhcos4.14
542- optional : true
543- - job : release:ngc-rhcos4.15
544- optional : true
545- - job : release:ngc-rhcos4.16
546- optional : true
547- - job : release:ngc-rhcos4.17
548- optional : true
549- - job : release:ngc-rhcos4.18
550- optional : true
551-
552- process-build-info-staging :
553- extends :
554- - .process-build-info
555- needs :
556- - job : release:staging-ubuntu20.04
557- optional : true
558- - job : release:staging-ubuntu22.04
559- optional : true
560- - job : release:staging-ubuntu24.04
561- optional : true
562- - job : release:staging-rhel8
563- optional : true
564-
565- .raise-merge-request :
522+ .update-nspect :
566523 stage : ngc-publish
524+ needs :
525+ - job : generate-build-info
526+ artifacts : true
567527 image :
568528 name : " ${CNT_NGC_PUBLISH_IMAGE}"
569529 pull_policy : always
570530 variables :
571- GITLAB_ACCESS_TOKEN : " ${CNT_GITLAB_TOKEN}"
531+ PROJECT_NAME : " gpu-driver-container"
532+ REPO_URL : " https://github.com/NVIDIA/gpu-driver-container.git"
572533 script :
573- - cnt-ngc-publish render --project-name "gpu-driver-container" --versions-file "combined-build-info.txt" --output gpu-driver-container.yaml
574- - cnt-ngc-publish merge-request --files "gpu-driver-container.yaml"
534+ - cnt-ngc-publish nspect --versions-file "build-info/${CI_PIPELINE_ID}-full.txt"
575535
576- raise-staging-merge-request :
536+ # Update the nspect staging environment to test the nspect publishing logic
537+ update-nspect-staging :
577538 extends :
578- - .raise-merge-request
579- needs :
580- - job : process-build-info-staging
581- artifacts : true
582- before_script :
583- - export NGC_PUBLISHING_PROJECT_PATH="dl/container-dev/ngc-automation"
539+ - .update-nspect
540+ except :
541+ - tags
542+ variables :
543+ ENV : " stage"
544+ RELEASE_VERSION : " test"
545+ NSPECT_CLIENT_ID : " ${NSPECT_STAGING_CLIENT_ID}"
546+ NSPECT_CLIENT_SECRET : " ${NSPECT_STAGING_CLIENT_SECRET}"
584547
585- raise-publishing-merge-request :
548+ # Update the nspect production environment with the new release
549+ update-nspect :
586550 extends :
587- - .raise-merge-request
551+ - .update-nspect
588552 rules :
589553 - if : $CI_COMMIT_TAG
590- needs :
591- - job : process-build-info-release
592- artifacts : true
554+ variables :
555+ OSRB_BUG_ID : " ${OSRB_BUG_ID}"
556+ ENV : " prod"
557+ RELEASE_VERSION : " ${CI_COMMIT_TAG}"
558+ NSPECT_CLIENT_ID : " ${NSPECT_PROD_CLIENT_ID}"
559+ NSPECT_CLIENT_SECRET : " ${NSPECT_PROD_CLIENT_SECRET}"
593560
594- .update-nspect :
561+ .publish-images :
595562 stage : ngc-publish
596- image :
563+ image :
597564 name : " ${CNT_NGC_PUBLISH_IMAGE}"
598565 pull_policy : always
599566 variables :
600- PROJECT_NAME : " gpu-driver-container"
601- REPO_URL :
" ssh://[email protected] :12051/dl/container-dev/driver.git" 567+ GITLAB_ACCESS_TOKEN : " ${CNT_GITLAB_TOKEN}"
602568 script :
603- - |
604- cnt-ngc-publish nspect --versions-file "combined-build-info.txt "
569+ - cnt-ngc-publish render --project-name "gpu-driver-container" --versions-file "build-info/${CI_PIPELINE_ID}-full.txt" --output gpu-driver-container.yaml
570+ - cnt-ngc-publish merge-request --files "gpu-driver-container.yaml "
605571
606- update-nspect-staging :
572+ # Raise an MR to publish the image to NGC
573+ ngc-image-publish :
574+ extends :
575+ - .publish-images
576+ rules :
577+ - if : $CI_COMMIT_TAG
607578 needs :
608- - job : process-build-info-staging
579+ - job : update-nspect
580+ - job : generate-build-info
609581 artifacts : true
610- extends :
611- - .update-nspect
612582 variables :
613- RELEASE_VERSION : " ${CI_COMMIT_SHORT_SHA}"
614- ENV : " stage"
615- before_script :
616- - export NSPECT_CLIENT_ID="${NSPECT_STAGING_CLIENT_ID}"
617- - export NSPECT_CLIENT_SECRET="${NSPECT_STAGING_CLIENT_SECRET}"
583+ NGC_PUBLISHING_PROJECT_PATH : " ${NGC_PUBLISHING_PROD_PROJECT_PATH}"
618584
619- update-nspect-publishing :
585+ # Create a dummy MR that exercises the publishing logic
586+ mock-image-publish :
587+ extends :
588+ - .publish-images
589+ except :
590+ - tags
620591 needs :
621- - job : process-build-info-release
592+ - job : update-nspect-staging
593+ - job : generate-build-info
622594 artifacts : true
623- extends :
624- - .update-nspect
625- rules :
626- - if : $CI_COMMIT_TAG
627595 variables :
628- RELEASE_VERSION : " ${CI_COMMIT_TAG}"
629- OSRB_BUG_ID : " ${OSRB_ID}"
630- ENV : " prod"
631- before_script :
632- - export NSPECT_CLIENT_ID="${NSPECT_CLIENT_ID}"
633- - export NSPECT_CLIENT_SECRET="${NSPECT_CLIENT_SECRET}"
596+ NGC_PUBLISHING_PROJECT_PATH : " ${NGC_PUBLISHING_TEST_PROJECT_PATH}"
0 commit comments