Skip to content
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

Release: add Gitlab pipeline for pushing helm charts to NGC #124

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
29 changes: 29 additions & 0 deletions .nvidia-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,13 @@ release:ngc:
- unzip ngccli_linux.zip
- chmod u+x ngc-cli/ngc

.helmcli-setup:
before_script:
- curl -sSLo helm.tar.gz https://get.helm.sh/helm-v3.15.4-linux-amd64.tar.gz
- tar -xvf helm.tar.gz
- mv linux-amd64/helm /usr/local/bin/helm
- chmod +x /usr/local/bin/helm

# .sign forms the base of the deployment jobs which signs images in the CI registry.
# This is extended with the image name and version to be deployed.
.sign:ngc:
Expand All @@ -164,6 +171,28 @@ release:ngc:
- 'echo "Signing the image ${IMAGE_NAME}:${IMAGE_TAG}"'
- ngc-cli/ngc registry image publish --source ${IMAGE_NAME}:${IMAGE_TAG} ${IMAGE_NAME}:${IMAGE_TAG} --public --discoverable --allow-guest --sign --org nvidia

helm:ngc:
image: ubuntu:latest
stage: release
needs:
- sign:ngc
rules:
- if: $CI_COMMIT_TAG
variables:
NGC_CLI_API_KEY: "${NGC_REGISTRY_TOKEN}"
retry:
max: 2
before_script:
- !reference [.ngccli-setup, before_script]
- !reference [.helmcli-setup, before_script]
- apt-get update && apt-get install -y make
script:
- 'echo "Pushing the helm chart to NGC"'
- helm lint deployments/helm/*
- make helm-chart
- export VERSION=$(awk -F= '/^VERSION/ { print $2 }' versions.mk | tr -d '[:space:]')
- ngc-cli/ngc registry chart push --source k8s-nim-operator-${VERSION}.tgz --org nvidia --team no-team nvidia/k8s-nim-operator:${VERSION}
ArangoGutierrez marked this conversation as resolved.
Show resolved Hide resolved

sign:ngc-short-tag:
extends:
- .sign:ngc
Expand Down
Binary file added k8s-nim-operator-v1.1.1.tgz
Binary file not shown.