@@ -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,97 @@ 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+ > build-info/${CI_PIPELINE_ID}-full.txt
513+ for DRIVER_VERSION in ${PUBLISH_VERSIONS}; do
514+ for file in build-info/${CI_PIPELINE_ID}-${DRIVER_VERSION}-*; do
515+ cat "$file" >> build-info/${CI_PIPELINE_ID}-full.txt
510516 done
511517 done
512- # Verify we have data
513- if [ ! -s combined-build-info.txt ]; then
514- echo "Error: No build information was collected"
518+ if [ ! -s "build-info/${CI_PIPELINE_ID}-full.txt" ]; then
519+ echo "Error: No build information was collected in the Release jobs"
515520 exit 1
516521 fi
517- artifacts :
518- paths :
519- - combined-build-info.txt
520522
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 :
523+ .update-nspect :
566524 stage : ngc-publish
525+ needs :
526+ - job : generate-build-info
527+ artifacts : true
567528 image :
568529 name : " ${CNT_NGC_PUBLISH_IMAGE}"
569530 pull_policy : always
570531 variables :
571- GITLAB_ACCESS_TOKEN : " ${CNT_GITLAB_TOKEN}"
532+ PROJECT_NAME : " driver"
533+ REPO_URL : " https://github.com/NVIDIA/gpu-driver-container.git"
572534 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 "
535+ - |
536+ cnt-ngc-publish nspect --versions-file "build-info/${CI_PIPELINE_ID}-full.txt "
575537
576- raise-staging-merge-request :
538+ # Update the nspect staging environment to test the nspect publishing logic
539+ update-nspect-staging :
577540 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"
541+ - .update-nspect
542+ except :
543+ - tags
544+ variables :
545+ ENV : " stage"
546+ RELEASE_VERSION : " test"
547+ NSPECT_CLIENT_ID : " ${NSPECT_STAGING_CLIENT_ID}"
548+ NSPECT_CLIENT_SECRET : " ${NSPECT_STAGING_CLIENT_SECRET}"
584549
585- raise-publishing-merge-request :
550+ # Update the nspect production environment with the new release
551+ update-nspect :
586552 extends :
587- - .raise-merge-request
553+ - .update-nspect
588554 rules :
589555 - if : $CI_COMMIT_TAG
590- needs :
591- - job : process-build-info-release
592- artifacts : true
556+ variables :
557+ OSRB_BUG_ID : " ${OSRB_BUG_ID}"
558+ ENV : " prod"
559+ RELEASE_VERSION : " ${CI_COMMIT_TAG}"
560+ NSPECT_CLIENT_ID : " ${NSPECT_PROD_CLIENT_ID}"
561+ NSPECT_CLIENT_SECRET : " ${NSPECT_PROD_CLIENT_SECRET}"
593562
594- .update-nspect :
563+ .publish-images :
595564 stage : ngc-publish
596- image :
565+ image :
597566 name : " ${CNT_NGC_PUBLISH_IMAGE}"
598567 pull_policy : always
599568 variables :
600- PROJECT_NAME : " gpu-driver-container"
601- REPO_URL :
" ssh://[email protected] :12051/dl/container-dev/driver.git" 569+ GITLAB_ACCESS_TOKEN : " ${CNT_GITLAB_TOKEN}"
602570 script :
603- - |
604- cnt-ngc-publish nspect --versions-file "combined-build-info.txt "
571+ - cnt-ngc-publish render --project-name "gpu-driver-container" --versions-file "build-info/${CI_PIPELINE_ID}-full.txt" --output gpu-driver-container.yaml
572+ - cnt-ngc-publish merge-request --files "gpu-driver-container.yaml "
605573
606- update-nspect-staging :
574+ # Raise an MR to publish the image to NGC
575+ ngc-image-publish :
576+ extends :
577+ - .publish-images
578+ rules :
579+ - if : $CI_COMMIT_TAG
607580 needs :
608- - job : process-build-info-staging
581+ - job : update-nspect
582+ - job : generate-build-info
609583 artifacts : true
610- extends :
611- - .update-nspect
612584 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}"
585+ NGC_PUBLISHING_PROJECT_PATH : " ${NGC_PUBLISHING_PROD_PROJECT_PATH}"
618586
619- update-nspect-publishing :
587+ # Create a dummy MR that exercises the publishing logic
588+ mock-image-publish :
589+ extends :
590+ - .publish-images
591+ except :
592+ - tags
620593 needs :
621- - job : process-build-info-release
594+ - job : update-nspect-staging
595+ - job : generate-build-info
622596 artifacts : true
623- extends :
624- - .update-nspect
625- rules :
626- - if : $CI_COMMIT_TAG
627597 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}"
598+ NGC_PUBLISHING_PROJECT_PATH : " ${NGC_PUBLISHING_TEST_PROJECT_PATH}"
0 commit comments