Skip to content

Added an ngc-publish stage to trigger the NGC Automation scripts for publishing #1249

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 27 additions & 6 deletions .common-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ scan-ubi9-arm64:
before_script:
- !reference [.regctl-setup, before_script]

# We ensure that the OUT_IMAGE_VERSION is set
# We ensure that the OUT_IMAGE_VERSION and OUT_IMAGE_NAME are set
- 'echo Version: ${OUT_IMAGE_VERSION} ; [[ -n "${OUT_IMAGE_VERSION}" ]] || exit 1'

- 'echo Version: ${OUT_IMAGE_NAME} ; [[ -n "${OUT_IMAGE_NAME}" ]] || exit 1'
# In the case where we are deploying a different version to the CI_COMMIT_SHA, we
# need to tag the image.
# Note: a leading 'v' is stripped from the version if present
Expand All @@ -185,10 +185,10 @@ scan-ubi9-arm64:
extends:
- .release
variables:
OUT_REGISTRY_USER: "${CI_REGISTRY_USER}"
OUT_REGISTRY_TOKEN: "${CI_REGISTRY_PASSWORD}"
OUT_REGISTRY: "${CI_REGISTRY}"
OUT_IMAGE_NAME: "${CI_REGISTRY_IMAGE}/staging/k8s-device-plugin"
OUT_REGISTRY_USER: "${NGC_REGISTRY_USER}"
OUT_REGISTRY_TOKEN: "${NGC_REGISTRY_TOKEN}"
OUT_REGISTRY: "${NGC_REGISTRY}"
OUT_IMAGE_NAME: "${NGC_REGISTRY_STAGING_IMAGE_NAME}"

# Define an external release step that pushes an image to an external repository.
# This includes a devlopment image off main.
Expand All @@ -209,3 +209,24 @@ release:staging-ubi9:
- .dist-ubi9
needs:
- image-ubi9

# Triggers the downstream container-dev/ngc-automation pipeline to publish the image to NGC
# This stage is triggered specifically on tags
trigger-downstream-publishing-pipeline:
extends:
- .dist-ubi9
needs:
- release:staging-ubi9
stage: release
rules:
- if: $CI_COMMIT_TAG
variables:
PROJECT_NAME: "k8s-device-plugin"
SOURCE_VERSION: "${CI_COMMIT_SHORT_SHA}"
TARGET_VERSION: "${CI_COMMIT_TAG}"
IMAGE_DIST_LIST: ",${DIST}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably out of scope for this PR, but why is there a comma here?

trigger:
project: "dl/container-dev/ngc-automation"
strategy: depend
forward:
pipeline_variables: true