Skip to content

Commit

Permalink
ubuntu24.04 ci pipeline fix
Browse files Browse the repository at this point in the history
Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>
  • Loading branch information
shivakunv committed Nov 21, 2024
1 parent 242c571 commit e13c517
Show file tree
Hide file tree
Showing 11 changed files with 209 additions and 19 deletions.
19 changes: 19 additions & 0 deletions .common-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,14 @@ trigger-pipeline:
rules:
- if: $CI_PIPELINE_SOURCE != "schedule"

.release-ubuntu24.04:
# Perform for each DRIVER_VERSION
extends:
- .release-generic
- .driver-versions
rules:
- if: $CI_PIPELINE_SOURCE != "schedule"

.release-rhel9:
# Perform for each DRIVER_VERSION
extends:
Expand Down Expand Up @@ -298,3 +306,14 @@ release:staging-precompiled-ubuntu22.04:
- .release:staging-precompiled
needs:
- image-precompiled-ubuntu22.04

# Precompiled Ubuntu24.04 release
release:staging-precompiled-ubuntu24.04:
variables:
DIST: signed_ubuntu24.04
BASE_TARGET: noble
extends:
- .driver-versions-precompiled-ubuntu24.04
- .release:staging-precompiled
needs:
- image-precompiled-ubuntu24.04
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_ssh_key: ${{ secrets.AWS_SSH_KEY }}
holodeck_config: "tests/holodeck.yaml"
holodeck_config: "tests/holodeck_ubuntu22.04.yaml"

- name: Get public dns name
id: get_public_dns_name
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@ on:
- opened
- synchronize
branches:
- main
- release-*
- main-no
push:
branches:
- main
- release-*
- main-no

jobs:
image:
Expand Down
56 changes: 47 additions & 9 deletions .github/workflows/precompiled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,20 @@
# Run this workflow on a schedule
name: Precompiled images

# on:
# schedule:
# - cron: '00 09 * * *' # scheduled job

on:
schedule:
- cron: '00 09 * * *'
pull_request:
types:
- opened
- synchronize
branches:
- ci-precompile-ubuntu24.04
push:
branches:
- ci-precompile-ubuntu24.04

jobs:
set-driver-version-matrix:
Expand All @@ -33,17 +44,26 @@ jobs:
id: extract_driver_branch
run: |
# get driver_branch
DRIVER_BRANCH=("535" "550")
# SHIVA
# DRIVER_BRANCH=("535" "550")
DRIVER_BRANCH=("550")
driver_branch_json=$(printf '%s\n' "${DRIVER_BRANCH[@]}" | jq -R . | jq -cs .)
echo "driver_branch=$driver_branch_json" >> $GITHUB_OUTPUT
# get kernel flavors
KERNEL_FLAVORS=("aws" "azure" "generic" "nvidia" "oracle")
# SHIVA
# KERNEL_FLAVORS=("aws" "azure" "generic" "nvidia" "oracle")
# KERNEL_FLAVORS=("azure" "generic" "nvidia" "oracle")
# KERNEL_FLAVORS=("aws")
KERNEL_FLAVORS=("generic")
kernel_flavors_json=$(printf '%s\n' "${KERNEL_FLAVORS[@]}" | jq -R . | jq -cs .)
echo "kernel_flavors=$kernel_flavors_json" >> $GITHUB_OUTPUT
# get ubuntu distributions
DIST=("ubuntu22.04")
# SHIVA
# DIST=("ubuntu22.04" "ubuntu24.04")
# DIST=("ubuntu22.04")
DIST=("ubuntu24.04")
dist_json=$(printf '%s\n' "${DIST[@]}" | jq -R . | jq -cs .)
echo "dist=$dist_json" >> $GITHUB_OUTPUT
Expand All @@ -60,6 +80,8 @@ jobs:
name: Check out code
- name: Calculate build vars
id: vars
env:
DIST: ${{ matrix.dist }}
run: |
echo "COMMIT_SHORT_SHA=${GITHUB_SHA:0:8}" >> $GITHUB_ENV
echo "LOWERCASE_REPO_OWNER=$(echo "${GITHUB_REPOSITORY_OWNER}" | awk '{print tolower($0)}')" >> $GITHUB_ENV
Expand All @@ -70,6 +92,14 @@ jobs:
echo "PUSH_ON_BUILD=${GENERATE_ARTIFACTS}" >> $GITHUB_ENV
echo "BUILD_MULTI_ARCH_IMAGES=${GENERATE_ARTIFACTS}" >> $GITHUB_ENV
if [ "$DIST" == "ubuntu22.04" ]; then
echo "BASE_TARGET=jammy" >> $GITHUB_OUTPUT
echo "LTS_KERNEL=5.15" >> $GITHUB_OUTPUT
elif [ "$DIST" == "ubuntu24.04" ]; then
echo "BASE_TARGET=noble" >> $GITHUB_OUTPUT
echo "LTS_KERNEL=6.8" >> $GITHUB_OUTPUT
fi
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
Expand All @@ -84,7 +114,8 @@ jobs:
env:
IMAGE_NAME: ghcr.io/nvidia/driver
VERSION: ${COMMIT_SHORT_SHA}
BASE_TARGET: jammy
BASE_TARGET: ${{ steps.vars.outputs.BASE_TARGET }}
LTS_KERNEL: ${{ steps.vars.outputs.LTS_KERNEL }}
run: |
make DRIVER_BRANCH=${{ matrix.driver_branch }} KERNEL_FLAVOR=${{ matrix.flavor }} build-base-${BASE_TARGET}
Expand Down Expand Up @@ -149,11 +180,18 @@ jobs:
- name: Set kernel version
id: set_kernel_version
env:
BASE_TARGET: "jammy"
DIST: ${{ matrix.dist }}
run: |
echo "matrix_values_not_empty=0" >> $GITHUB_OUTPUT
if [ "$DIST" == "ubuntu22.04" ]; then
export BASE_TARGET="jammy"
export LTS_KERNEL="5.15"
elif [ "$DIST" == "ubuntu24.04" ]; then
export BASE_TARGET=noble"
export LTS_KERNEL=6.8"
fi
kernel_flavors_json='${{ needs.set-driver-version-matrix.outputs.kernel_flavors }}'
KERNEL_FLAVORS=($(echo "$kernel_flavors_json" | jq -r '.[]'))
driver_branch_json='${{ needs.set-driver-version-matrix.outputs.driver_branch }}'
Expand Down Expand Up @@ -201,7 +239,7 @@ jobs:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_ssh_key: ${{ secrets.AWS_SSH_KEY }}
holodeck_config: "tests/holodeck.yaml"
holodeck_config: "tests/holodeck_${{ matrix.dist }}.yaml"

- name: Get public dns name
id: get_public_dns_name
Expand Down Expand Up @@ -296,7 +334,7 @@ jobs:
matrix:
driver_branch: ${{ fromJson(needs.set-driver-version-matrix.outputs.driver_branch) }}
kernel_version: ${{ fromJson(needs.determine-e2e-test-matrix.outputs.matrix_values) }}
dist: ${{ fromJson(needs.set-driver-version-matrix.outputs.dist) }}
dist: ${{ fromJson(needs.set-driver-version-matrix.outputs.dist) }}
steps:
- name: Check out code
uses: actions/checkout@v4
Expand Down
18 changes: 18 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@ include:
rules:
- if: $CI_PIPELINE_SOURCE != "schedule"

# Define the image build targets
.image-build-ubuntu24.04:
# Perform for each DRIVER_VERSION
extends:
- .driver-versions
- .image-build-generic
rules:
- if: $CI_PIPELINE_SOURCE != "schedule"

# Define the image build targets
.image-build-rhel9:
# Perform for each DRIVER_VERSION
Expand Down Expand Up @@ -111,3 +120,12 @@ image-precompiled-ubuntu22.04:
extends:
- .driver-versions-precompiled-ubuntu22.04
- .image-build-precompiled

image-precompiled-ubuntu24.04:
variables:
DIST: signed_ubuntu24.04
BASE_TARGET: noble
CVE_UPDATES: "curl libc6"
extends:
- .driver-versions-precompiled-ubuntu24.04
- .image-build-precompiled
85 changes: 85 additions & 0 deletions .nvidia-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,30 @@ variables:
- !reference [.image-pull-rules, rules]


.image-pull-ubuntu24.04:
# Perform for each DRIVER_VERSION
extends:
- .driver-versions
- .image-pull-generic
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
when: never
- !reference [.image-pull-rules, rules]

image-precompiled-ubuntu24.04:
variables:
DIST: signed_ubuntu24.04
BASE_TARGET: noble
PRECOMPILED: "true"
CVE_UPDATES: "curl libc6"
rules:
- when: delayed
start_in: 30 minutes
extends:
- .driver-versions-precompiled-ubuntu24.04
- .image-pull-generic


.image-pull-ubuntu22.04:
# Perform for each DRIVER_VERSION
extends:
Expand Down Expand Up @@ -184,6 +208,30 @@ image-rhel8:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- !reference [.pipeline-trigger-rules, rules]

.scan-ubuntu24.04:
# Repeat for each DRIVER_VERSION
extends:
- .driver-versions
- .scan-generic
rules:
- !reference [.scan-rules-common, rules]
- if: $CI_PIPELINE_SOURCE == "schedule"
when: never
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- !reference [.pipeline-trigger-rules, rules]

.scan-precompiled-ubuntu24.04:
variables:
DIST: signed_ubuntu24.04
BASE_TARGET: noble
PRECOMPILED: "true"
extends:
- .driver-versions-precompiled-ubuntu24.04
- .scan-generic
rules:
- !reference [.scan-rules-common, rules]
- when: always

.scan-precompiled-ubuntu22.04:
variables:
DIST: signed_ubuntu22.04
Expand Down Expand Up @@ -294,6 +342,25 @@ release:ngc-ubuntu22.04:
- .dist-ubuntu22.04
- .driver-versions

release:ngc-ubuntu24.04:
extends:
- .release:ngc
- .dist-ubuntu24.04
- .driver-versions

release:ngc-precompiled-ubuntu24.04:
variables:
DIST: signed_ubuntu24.04
BASE_TARGET: noble
PRECOMPILED: "true"
extends:
- .driver-versions-precompiled-ubuntu24.04
- .release-generic
- .release:ngc-variables
rules:
# Only run NGC release job on scheduled pipelines
- if: $CI_PIPELINE_SOURCE == "schedule"

release:ngc-precompiled-ubuntu22.04:
variables:
DIST: signed_ubuntu22.04
Expand Down Expand Up @@ -421,6 +488,23 @@ release:ngc-rhel8.10:
- '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

sign:ngc-precompiled-ubuntu24.04:
extends:
- .driver-versions-precompiled-ubuntu24.04
- .dist-ubuntu22.04
- .release-generic
- .release:ngc-variables
- .sign:ngc
variables:
DIST: signed_ubuntu24.04
BASE_TARGET: noble
PRECOMPILED: "true"
needs:
- release:ngc-precompiled-ubuntu24.04
rules:
# Only run NGC release job on scheduled pipelines
- if: $CI_PIPELINE_SOURCE == "schedule"

sign:ngc-precompiled-ubuntu22.04:
extends:
- .driver-versions-precompiled-ubuntu22.04
Expand All @@ -445,6 +529,7 @@ sign:ngc-ubuntu-rhel-rhcos:
matrix:
- SIGN_JOB_NAME: ["ubuntu"]
VERSION: ["24.04"]
DRIVER_VERSION: ["535.216.01", "550.127.05", "565.57.01"]
- SIGN_JOB_NAME: ["ubuntu"]
VERSION: ["22.04"]
DRIVER_VERSION: ["535.216.01", "550.127.05", "565.57.01"]
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ OUT_IMAGE_TAG = $(OUT_IMAGE_VERSION)-$(OUT_DIST)
OUT_IMAGE = $(OUT_IMAGE_NAME):$(OUT_IMAGE_TAG)

##### Public rules #####
DISTRIBUTIONS := ubuntu18.04 ubuntu20.04 ubuntu22.04 ubuntu24.04 signed_ubuntu20.04 signed_ubuntu22.04 rhel8 rhel9 flatcar fedora36 sles15.3 precompiled_rhcos
DISTRIBUTIONS := ubuntu18.04 ubuntu20.04 ubuntu22.04 ubuntu24.04 signed_ubuntu24.04 signed_ubuntu20.04 signed_ubuntu22.04 rhel8 rhel9 flatcar fedora36 sles15.3 precompiled_rhcos
PUSH_TARGETS := $(patsubst %, push-%, $(DISTRIBUTIONS))
BASE_FROM := jammy focal
BASE_FROM := jammy focal noble
PUSH_TARGETS := $(patsubst %, push-%, $(DISTRIBUTIONS))
DRIVER_PUSH_TARGETS := $(foreach push_target, $(PUSH_TARGETS), $(addprefix $(push_target)-, $(DRIVER_VERSIONS)))
BUILD_TARGETS := $(patsubst %, build-%, $(DISTRIBUTIONS))
Expand Down
File renamed without changes.
32 changes: 32 additions & 0 deletions tests/holodeck_ubuntu24.04.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
apiVersion: holodeck.nvidia.com/v1alpha1
kind: Environment
metadata:
name: HOLODECK_NAME
description: "end-to-end test infrastructure"
spec:
provider: aws
auth:
keyName: cnt-ci
privateKey: HOLODECK_PRIVATE_KEY
instance:
type: g4dn.xlarge
region: us-west-1
ingressIpRanges:
- 18.190.12.32/32
- 3.143.46.93/32
- 52.15.119.136/32
- 35.155.108.162/32
- 35.162.190.51/32
- 54.201.61.24/32
image:
architecture: amd64
imageId: ami-0da424eb883458071
containerRuntime:
install: true
name: containerd
version: 1.7.22
kubernetes:
install: true
installer: kubeadm
version: v1.30.0
crictlVersion: v1.30.0
4 changes: 2 additions & 2 deletions tests/scripts/.definitions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ CASES_DIR="$( cd "${TEST_DIR}/cases" && pwd )"

: ${HELM_NVIDIA_REPO:="https://helm.ngc.nvidia.com/nvidia"}

: ${DAEMON_POD_STATUS_TIME_OUT:="15m"}
: ${POD_STATUS_TIME_OUT:="2m"}
: ${DAEMON_POD_STATUS_TIME_OUT:="600m"}
: ${POD_STATUS_TIME_OUT:="600m"}

: ${LOG_DIR:="/tmp/logs"}

Expand Down
2 changes: 1 addition & 1 deletion tests/scripts/ci-precompiled-helpers.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
get_kernel_versions_to_test() {
if [[ "$#" -ne 4 ]]; then
echo " Error:$0 must be called with BASE_TARGET DRIVER_BRANCHES DRIVER_BRANCHES DIST" >&2
echo " Error:$0 must be called with BASE_TARGET KERNEL_FLAVORS DRIVER_BRANCHES DIST" >&2
exit 1
fi

Expand Down

0 comments on commit e13c517

Please sign in to comment.