Skip to content

Commit a5d1911

Browse files
tariq1890shivakunv
authored andcommitted
ubuntu24.04 ci pipeline fix
Signed-off-by: shiva kumar <[email protected]>
1 parent eea136d commit a5d1911

File tree

11 files changed

+272
-24
lines changed

11 files changed

+272
-24
lines changed

.common-ci.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,13 @@ trigger-pipeline:
8888
- DRIVER_BRANCH: [535, 550]
8989
KERNEL_FLAVOR: [aws, azure, generic, nvidia, oracle]
9090

91+
# Define the matrix of precompiled jobs that can be run in parallel for ubuntu24.04
92+
.driver-versions-precompiled-ubuntu24.04:
93+
parallel:
94+
matrix:
95+
- DRIVER_BRANCH: [535, 550]
96+
KERNEL_FLAVOR: [aws, azure, generic, nvidia, oracle]
97+
9198
# Define the distribution targets
9299
.dist-ubuntu20.04:
93100
variables:
@@ -172,6 +179,14 @@ trigger-pipeline:
172179
rules:
173180
- if: $CI_PIPELINE_SOURCE != "schedule"
174181

182+
.release-ubuntu24.04:
183+
# Perform for each DRIVER_VERSION
184+
extends:
185+
- .release-generic
186+
- .driver-versions
187+
rules:
188+
- if: $CI_PIPELINE_SOURCE != "schedule"
189+
175190
.release-rhel9:
176191
# Perform for each DRIVER_VERSION
177192
extends:
@@ -304,3 +319,14 @@ release:staging-precompiled-ubuntu22.04:
304319
- .release:staging-precompiled
305320
needs:
306321
- image-precompiled-ubuntu22.04
322+
323+
# Precompiled Ubuntu24.04 release
324+
release:staging-precompiled-ubuntu24.04:
325+
variables:
326+
DIST: signed_ubuntu24.04
327+
BASE_TARGET: noble
328+
extends:
329+
- .driver-versions-precompiled-ubuntu24.04
330+
- .release:staging-precompiled
331+
needs:
332+
- image-precompiled-ubuntu24.04

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
4141
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
4242
aws_ssh_key: ${{ secrets.AWS_SSH_KEY }}
43-
holodeck_config: "tests/holodeck.yaml"
43+
holodeck_config: "tests/holodeck_ubuntu22.04.yaml"
4444

4545
- name: Get public dns name
4646
id: get_public_dns_name

.github/workflows/precompiled.yaml

Lines changed: 58 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,20 @@
1515
# Run this workflow on a schedule
1616
name: Precompiled images
1717

18+
# on:
19+
# schedule:
20+
# - cron: '00 09 * * *' # scheduled job
21+
1822
on:
19-
schedule:
20-
- cron: '00 09 * * *'
23+
pull_request:
24+
types:
25+
- opened
26+
- synchronize
27+
branches:
28+
- ci-precompile-ubuntu24.04
29+
push:
30+
branches:
31+
- ci-precompile-ubuntu24.04
2132

2233
jobs:
2334
set-driver-version-matrix:
@@ -43,7 +54,8 @@ jobs:
4354
echo "kernel_flavors=$kernel_flavors_json" >> $GITHUB_OUTPUT
4455
4556
# get ubuntu distributions
46-
DIST=("ubuntu22.04")
57+
# DIST=("ubuntu22.04" "ubuntu24.04")
58+
DIST=("ubuntu24.04")
4759
dist_json=$(printf '%s\n' "${DIST[@]}" | jq -R . | jq -cs .)
4860
echo "dist=$dist_json" >> $GITHUB_OUTPUT
4961
@@ -60,6 +72,8 @@ jobs:
6072
name: Check out code
6173
- name: Calculate build vars
6274
id: vars
75+
env:
76+
DIST: ${{ matrix.dist }}
6377
run: |
6478
echo "COMMIT_SHORT_SHA=${GITHUB_SHA:0:8}" >> $GITHUB_ENV
6579
echo "LOWERCASE_REPO_OWNER=$(echo "${GITHUB_REPOSITORY_OWNER}" | awk '{print tolower($0)}')" >> $GITHUB_ENV
@@ -70,6 +84,14 @@ jobs:
7084
echo "PUSH_ON_BUILD=${GENERATE_ARTIFACTS}" >> $GITHUB_ENV
7185
echo "BUILD_MULTI_ARCH_IMAGES=${GENERATE_ARTIFACTS}" >> $GITHUB_ENV
7286
87+
if [ "$DIST" == "ubuntu22.04" ]; then
88+
echo "BASE_TARGET=jammy" >> $GITHUB_OUTPUT
89+
echo "LTS_KERNEL=5.15" >> $GITHUB_OUTPUT
90+
elif [ "$DIST" == "ubuntu24.04" ]; then
91+
echo "BASE_TARGET=noble" >> $GITHUB_OUTPUT
92+
echo "LTS_KERNEL=6.8" >> $GITHUB_OUTPUT
93+
fi
94+
7395
- name: Set up QEMU
7496
uses: docker/setup-qemu-action@v3
7597
- name: Set up Docker Buildx
@@ -84,9 +106,10 @@ jobs:
84106
env:
85107
IMAGE_NAME: ghcr.io/nvidia/driver
86108
VERSION: ${COMMIT_SHORT_SHA}
87-
BASE_TARGET: jammy
109+
BASE_TARGET: ${{ steps.vars.outputs.BASE_TARGET }}
110+
LTS_KERNEL: ${{ steps.vars.outputs.LTS_KERNEL }}
88111
run: |
89-
make DRIVER_BRANCH=${{ matrix.driver_branch }} KERNEL_FLAVOR=${{ matrix.flavor }} build-base-${BASE_TARGET}
112+
make DRIVER_BRANCH=${{ matrix.driver_branch }} KERNEL_FLAVOR=${{ matrix.flavor }} LTS_KERNEL=${LTS_KERNEL} build-base-${BASE_TARGET}
90113
91114
trap "docker rm -f base-${BASE_TARGET}-${{ matrix.flavor }}" EXIT
92115
docker run -d --name base-${BASE_TARGET}-${{ matrix.flavor }} ghcr.io/nvidia/driver:base-${BASE_TARGET}-${{ matrix.flavor }}-${{ matrix.driver_branch }}
@@ -105,12 +128,13 @@ jobs:
105128
source kernel_version.txt && \
106129
make DRIVER_VERSIONS=${DRIVER_VERSIONS} DRIVER_BRANCH=${{ matrix.driver_branch }} build-${DIST}-${DRIVER_VERSION}
107130
108-
- name: Save build image as a tar
131+
- name: Save build image and kernel version file
109132
env:
110133
DIST: ${{ matrix.dist }}
111134
PRIVATE_REGISTRY: "ghcr.io"
112135
run: |
113136
source kernel_version.txt
137+
tar -cvf kernel-version-${{ matrix.driver_branch }}-${KERNEL_VERSION}-${DIST}.tar kernel_version.txt
114138
docker save "${PRIVATE_REGISTRY}/nvidia/driver:${{ matrix.driver_branch }}-${KERNEL_VERSION}-${DIST}" \
115139
-o ./driver-images-${{ matrix.driver_branch }}-${KERNEL_VERSION}-${DIST}.tar
116140
# set env for artifacts upload
@@ -123,7 +147,14 @@ jobs:
123147
name: driver-images-${{ matrix.driver_branch }}-${{ env.KERNEL_VERSION }}-${{ env.DIST }}
124148
path: ./driver-images-${{ matrix.driver_branch }}-${{ env.KERNEL_VERSION }}-${{ env.DIST }}.tar
125149
retention-days: 1
126-
150+
151+
- name: Upload kernel version as an artifact
152+
uses: actions/upload-artifact@v4
153+
with:
154+
name: kernel-version-${{ matrix.driver_branch }}-${{ env.KERNEL_VERSION }}-${{ env.DIST }}
155+
path: ./kernel-version-${{ matrix.driver_branch }}-${{ env.KERNEL_VERSION }}-${{ env.DIST }}.tar
156+
retention-days: 1
157+
127158
determine-e2e-test-matrix:
128159
runs-on: linux-amd64-cpu4
129160
strategy:
@@ -149,11 +180,19 @@ jobs:
149180
- name: Set kernel version
150181
id: set_kernel_version
151182
env:
152-
BASE_TARGET: "jammy"
153183
DIST: ${{ matrix.dist }}
184+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
154185
run: |
155186
echo "matrix_values_not_empty=0" >> $GITHUB_OUTPUT
156187
188+
if [ "$DIST" == "ubuntu22.04" ]; then
189+
export BASE_TARGET="jammy"
190+
export LTS_KERNEL="5.15"
191+
elif [ "$DIST" == "ubuntu24.04" ]; then
192+
export BASE_TARGET="noble"
193+
export LTS_KERNEL="6.8"
194+
fi
195+
157196
kernel_flavors_json='${{ needs.set-driver-version-matrix.outputs.kernel_flavors }}'
158197
KERNEL_FLAVORS=($(echo "$kernel_flavors_json" | jq -r '.[]'))
159198
driver_branch_json='${{ needs.set-driver-version-matrix.outputs.driver_branch }}'
@@ -201,7 +240,7 @@ jobs:
201240
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
202241
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
203242
aws_ssh_key: ${{ secrets.AWS_SSH_KEY }}
204-
holodeck_config: "tests/holodeck.yaml"
243+
holodeck_config: "tests/holodeck_${{ matrix.dist }}.yaml"
205244

206245
- name: Get public dns name
207246
id: get_public_dns_name
@@ -222,6 +261,15 @@ jobs:
222261
DRIVER_BRANCHES=($(echo "$driver_branch_json" | jq -r '.[]'))
223262
echo "DRIVER_BRANCHES=${DRIVER_BRANCHES[*]}" >> $GITHUB_ENV
224263
264+
# step added to skip azure e2e tests and publish the image
265+
# FIXME -- remove step once azure kernel upgrade starts working
266+
- name: Skip azure e2e
267+
run: |
268+
if [[ "${KERNEL_VERSION}" == *-azure ]]; then
269+
echo "e2e test for azure flavor skipped, as kernel upgrade AWS => azure is not supported"
270+
exit 0
271+
fi
272+
225273
- name: Install GitHub CLI
226274
run: |
227275
sudo apt-get update
@@ -296,7 +344,7 @@ jobs:
296344
matrix:
297345
driver_branch: ${{ fromJson(needs.set-driver-version-matrix.outputs.driver_branch) }}
298346
kernel_version: ${{ fromJson(needs.determine-e2e-test-matrix.outputs.matrix_values) }}
299-
dist: ${{ fromJson(needs.set-driver-version-matrix.outputs.dist) }}
347+
dist: ${{ fromJson(needs.set-driver-version-matrix.outputs.dist) }}
300348
steps:
301349
- name: Check out code
302350
uses: actions/checkout@v4

.gitlab-ci.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ include:
5353
.image-build-ubuntu24.04:
5454
# Perform for each DRIVER_VERSION
5555
extends:
56-
- .driver-versions-ubuntu24.04
56+
- .driver-versions
5757
- .image-build-generic
5858
rules:
5959
- if: $CI_PIPELINE_SOURCE != "schedule"
@@ -120,3 +120,12 @@ image-precompiled-ubuntu22.04:
120120
extends:
121121
- .driver-versions-precompiled-ubuntu22.04
122122
- .image-build-precompiled
123+
124+
image-precompiled-ubuntu24.04:
125+
variables:
126+
DIST: signed_ubuntu24.04
127+
BASE_TARGET: noble
128+
CVE_UPDATES: "curl libc6"
129+
extends:
130+
- .driver-versions-precompiled-ubuntu24.04
131+
- .image-build-precompiled

.nvidia-ci.yml

Lines changed: 76 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,30 @@ variables:
7777
- !reference [.image-pull-rules, rules]
7878

7979

80+
.image-pull-ubuntu24.04:
81+
# Perform for each DRIVER_VERSION
82+
extends:
83+
- .driver-versions
84+
- .image-pull-generic
85+
rules:
86+
- if: $CI_PIPELINE_SOURCE == "schedule"
87+
when: never
88+
- !reference [.image-pull-rules, rules]
89+
90+
image-precompiled-ubuntu24.04:
91+
variables:
92+
DIST: signed_ubuntu24.04
93+
BASE_TARGET: noble
94+
PRECOMPILED: "true"
95+
CVE_UPDATES: "curl libc6"
96+
rules:
97+
- when: delayed
98+
start_in: 30 minutes
99+
extends:
100+
- .driver-versions-precompiled-ubuntu24.04
101+
- .image-pull-generic
102+
103+
80104
.image-pull-ubuntu22.04:
81105
# Perform for each DRIVER_VERSION
82106
extends:
@@ -187,7 +211,7 @@ image-rhel8:
187211
.scan-ubuntu24.04:
188212
# Repeat for each DRIVER_VERSION
189213
extends:
190-
- .driver-versions-ubuntu24.04
214+
- .driver-versions
191215
- .scan-generic
192216
rules:
193217
- !reference [.scan-rules-common, rules]
@@ -196,6 +220,18 @@ image-rhel8:
196220
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
197221
- !reference [.pipeline-trigger-rules, rules]
198222

223+
.scan-precompiled-ubuntu24.04:
224+
variables:
225+
DIST: signed_ubuntu24.04
226+
BASE_TARGET: noble
227+
PRECOMPILED: "true"
228+
extends:
229+
- .driver-versions-precompiled-ubuntu24.04
230+
- .scan-generic
231+
rules:
232+
- !reference [.scan-rules-common, rules]
233+
- when: always
234+
199235
.scan-precompiled-ubuntu22.04:
200236
variables:
201237
DIST: signed_ubuntu22.04
@@ -306,6 +342,25 @@ release:ngc-ubuntu22.04:
306342
- .dist-ubuntu22.04
307343
- .driver-versions
308344

345+
release:ngc-ubuntu24.04:
346+
extends:
347+
- .release:ngc
348+
- .dist-ubuntu24.04
349+
- .driver-versions
350+
351+
release:ngc-precompiled-ubuntu24.04:
352+
variables:
353+
DIST: signed_ubuntu24.04
354+
BASE_TARGET: noble
355+
PRECOMPILED: "true"
356+
extends:
357+
- .driver-versions-precompiled-ubuntu24.04
358+
- .release-generic
359+
- .release:ngc-variables
360+
rules:
361+
# Only run NGC release job on scheduled pipelines
362+
- if: $CI_PIPELINE_SOURCE == "schedule"
363+
309364
release:ngc-precompiled-ubuntu22.04:
310365
variables:
311366
DIST: signed_ubuntu22.04
@@ -433,6 +488,23 @@ release:ngc-rhel8.10:
433488
- 'echo "Signing the image ${IMAGE_NAME}:${IMAGE_TAG}"'
434489
- ngc-cli/ngc registry image publish --source ${IMAGE_NAME}:${IMAGE_TAG} ${IMAGE_NAME}:${IMAGE_TAG} --public --discoverable --allow-guest --sign --org nvidia
435490

491+
sign:ngc-precompiled-ubuntu24.04:
492+
extends:
493+
- .driver-versions-precompiled-ubuntu24.04
494+
- .dist-ubuntu22.04
495+
- .release-generic
496+
- .release:ngc-variables
497+
- .sign:ngc
498+
variables:
499+
DIST: signed_ubuntu24.04
500+
BASE_TARGET: noble
501+
PRECOMPILED: "true"
502+
needs:
503+
- release:ngc-precompiled-ubuntu24.04
504+
rules:
505+
# Only run NGC release job on scheduled pipelines
506+
- if: $CI_PIPELINE_SOURCE == "schedule"
507+
436508
sign:ngc-precompiled-ubuntu22.04:
437509
extends:
438510
- .driver-versions-precompiled-ubuntu22.04
@@ -455,6 +527,9 @@ sign:ngc-ubuntu-rhel-rhcos:
455527
- .sign:ngc
456528
parallel:
457529
matrix:
530+
- SIGN_JOB_NAME: ["ubuntu"]
531+
VERSION: ["24.04"]
532+
DRIVER_VERSION: ["535.216.03", "550.127.08"]
458533
- SIGN_JOB_NAME: ["ubuntu"]
459534
VERSION: ["22.04"]
460535
DRIVER_VERSION: ["535.216.03", "550.127.08"]

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ OUT_IMAGE_TAG = $(OUT_IMAGE_VERSION)-$(OUT_DIST)
5454
OUT_IMAGE = $(OUT_IMAGE_NAME):$(OUT_IMAGE_TAG)
5555

5656
##### Public rules #####
57-
DISTRIBUTIONS := ubuntu18.04 ubuntu20.04 ubuntu22.04 ubuntu24.04 signed_ubuntu20.04 signed_ubuntu22.04 signed_ubuntu24.04 rhel8 rhel9 flatcar fedora36 sles15.3 precompiled_rhcos
57+
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
5858
PUSH_TARGETS := $(patsubst %, push-%, $(DISTRIBUTIONS))
59-
BASE_FROM := jammy focal
59+
BASE_FROM := jammy focal noble
6060
PUSH_TARGETS := $(patsubst %, push-%, $(DISTRIBUTIONS))
6161
DRIVER_PUSH_TARGETS := $(foreach push_target, $(PUSH_TARGETS), $(addprefix $(push_target)-, $(DRIVER_VERSIONS)))
6262
BUILD_TARGETS := $(patsubst %, build-%, $(DISTRIBUTIONS))
@@ -210,6 +210,7 @@ $(BASE_BUILD_TARGETS):
210210
--build-arg GOLANG_VERSION="$(GOLANG_VERSION)" \
211211
--build-arg DRIVER_BRANCH="$(DRIVER_BRANCH)" \
212212
--build-arg KERNEL_FLAVOR="$(KERNEL_FLAVOR)" \
213+
--build-arg LTS_KERNEL="$(LTS_KERNEL)" \
213214
--file $(DOCKERFILE) \
214215
$(CURDIR)/base
215216

0 commit comments

Comments
 (0)