Skip to content

Commit aa0d4af

Browse files
authored
Merge pull request #951 from elezar/add-e2e-tests
Add e2e tests to release-1.17 branch
2 parents 267fb59 + 48d538e commit aa0d4af

File tree

822 files changed

+444565
-182
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

822 files changed

+444565
-182
lines changed

.github/dependabot.yml

Lines changed: 77 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,72 +3,118 @@
33

44
version: 2
55
updates:
6+
# main branch
67
- package-ecosystem: "gomod"
78
target-branch: main
8-
directory: "/"
9+
directories:
10+
- "/"
11+
- "deployments/devel"
12+
- "tests"
913
schedule:
10-
interval: "weekly"
11-
day: "sunday"
12-
ignore:
13-
- dependency-name: k8s.io/*
14+
interval: "daily"
1415
labels:
1516
- dependencies
17+
groups:
18+
k8sio:
19+
patterns:
20+
- k8s.io/*
21+
exclude-patterns:
22+
- k8s.io/klog/*
1623

1724
- package-ecosystem: "docker"
1825
target-branch: main
19-
directory: "/deployments/container"
26+
directories:
27+
# CUDA image
28+
- "/deployments/container"
29+
# Golang version
30+
- "/deployments/devel"
2031
schedule:
2132
interval: "daily"
33+
labels:
34+
- dependencies
2235

23-
- package-ecosystem: "gomod"
24-
# This defines a specific dependabot rule for the latest release-* branch.
25-
target-branch: release-1.16
36+
- package-ecosystem: "github-actions"
37+
target-branch: main
2638
directory: "/"
2739
schedule:
28-
interval: "weekly"
29-
day: "sunday"
30-
ignore:
31-
- dependency-name: k8s.io/*
40+
interval: "daily"
3241
labels:
3342
- dependencies
34-
- maintenance
3543

36-
- package-ecosystem: "docker"
37-
target-branch: release-1.16
38-
directory: "/deployments/container"
44+
# Allow dependabot to update the libnvidia-container submodule.
45+
- package-ecosystem: "gitsubmodule"
46+
target-branch: main
47+
directory: "/"
48+
allow:
49+
- dependency-name: "third_party/libnvidia-container"
3950
schedule:
4051
interval: "daily"
4152
labels:
4253
- dependencies
43-
- maintenance
54+
- libnvidia-container
4455

56+
# The release branch(es):
4557
- package-ecosystem: "gomod"
46-
target-branch: main
47-
directory: "deployments/devel"
58+
target-branch: release-1.17
59+
directories:
60+
- "/"
61+
# We don't update development or test dependencies on release branches
62+
# - "deployments/devel"
63+
# - "tests"
4864
schedule:
4965
interval: "weekly"
5066
day: "sunday"
67+
labels:
68+
- dependencies
69+
- maintenance
70+
ignore:
71+
# For release branches we only consider patch updates.
72+
- dependency-name: "*"
73+
update-types:
74+
- version-update:semver-major
75+
- version-update:semver-minor
76+
groups:
77+
k8sio:
78+
patterns:
79+
- k8s.io/*
80+
exclude-patterns:
81+
- k8s.io/klog/*
5182

52-
# A dependabot rule to bump the golang version.
5383
- package-ecosystem: "docker"
54-
target-branch: main
55-
directory: "/deployments/devel"
84+
target-branch: release-1.17
85+
directories:
86+
# CUDA image
87+
- "/deployments/container"
88+
# Golang version
89+
- "/deployments/devel"
5690
schedule:
57-
interval: "daily"
91+
interval: "weekly"
92+
day: "sunday"
93+
ignore:
94+
# For release branches we only apply patch updates to the golang version.
95+
- dependency-name: "*golang*"
96+
update-types:
97+
- version-update:semver-major
98+
- version-update:semver-minor
99+
labels:
100+
- dependencies
101+
- maintenance
58102

59103
- package-ecosystem: "github-actions"
104+
target-branch: release-1.17
60105
directory: "/"
61106
schedule:
62-
interval: "daily"
107+
interval: "weekly"
108+
day: "sunday"
109+
labels:
110+
- dependencies
111+
- maintenance
63112

64-
# Allow dependabot to update the libnvidia-container submodule.
65-
- package-ecosystem: "gitsubmodule"
66-
target-branch: main
113+
# Github actions need to be gh-pages branches.
114+
- package-ecosystem: "github-actions"
115+
target-branch: gh-pages
67116
directory: "/"
68-
allow:
69-
- dependency-name: "third_party/libnvidia-container"
70117
schedule:
71118
interval: "daily"
72119
labels:
73120
- dependencies
74-
- libnvidia-container

.github/workflows/ci.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Copyright 2025 NVIDIA CORPORATION
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: CI Pipeline
16+
17+
on:
18+
push:
19+
branches:
20+
- "pull-request/[0-9]+"
21+
- main
22+
- release-*
23+
24+
jobs:
25+
code-scanning:
26+
uses: ./.github/workflows/code_scanning.yaml
27+
28+
variables:
29+
runs-on: ubuntu-latest
30+
outputs:
31+
version: ${{ steps.version.outputs.version }}
32+
steps:
33+
- name: Generate Commit Short SHA
34+
id: version
35+
run: echo "version=$(echo $GITHUB_SHA | cut -c1-8)" >> "$GITHUB_OUTPUT"
36+
37+
golang:
38+
uses: ./.github/workflows/golang.yaml
39+
40+
image:
41+
uses: ./.github/workflows/image.yaml
42+
needs: [variables, golang, code-scanning]
43+
secrets: inherit
44+
with:
45+
version: ${{ needs.variables.outputs.version }}
46+
build_multi_arch_images: ${{ github.ref_name == 'main' || startsWith(github.ref_name, 'release-') }}
47+
48+
e2e-test:
49+
needs: [image, variables]
50+
secrets: inherit
51+
uses: ./.github/workflows/e2e.yaml
52+
with:
53+
version: ${{ needs.variables.outputs.version }}

.github/workflows/code_scanning.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,14 @@
1515
name: "CodeQL"
1616

1717
on:
18+
workflow_call: {}
1819
pull_request:
1920
types:
2021
- opened
2122
- synchronize
2223
branches:
2324
- main
2425
- release-*
25-
push:
26-
branches:
27-
- main
28-
- release-*
2926

3027
jobs:
3128
analyze:

.github/workflows/e2e.yaml

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# Copyright 2025 NVIDIA CORPORATION
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: End-to-end Tests
16+
17+
on:
18+
workflow_call:
19+
inputs:
20+
version:
21+
required: true
22+
type: string
23+
secrets:
24+
AWS_ACCESS_KEY_ID:
25+
required: true
26+
AWS_SECRET_ACCESS_KEY:
27+
required: true
28+
AWS_SSH_KEY:
29+
required: true
30+
E2E_SSH_USER:
31+
required: true
32+
SLACK_BOT_TOKEN:
33+
required: true
34+
SLACK_CHANNEL_ID:
35+
required: true
36+
37+
jobs:
38+
e2e-tests:
39+
runs-on: linux-amd64-cpu4
40+
steps:
41+
- name: Check out code
42+
uses: actions/checkout@v4
43+
44+
- name: Calculate build vars
45+
id: vars
46+
run: |
47+
echo "COMMIT_SHORT_SHA=${GITHUB_SHA:0:8}" >> $GITHUB_ENV
48+
echo "LOWERCASE_REPO_OWNER=$(echo "${GITHUB_REPOSITORY_OWNER}" | awk '{print tolower($0)}')" >> $GITHUB_ENV
49+
GOLANG_VERSION=$(./hack/golang-version.sh)
50+
echo "GOLANG_VERSION=${GOLANG_VERSION##GOLANG_VERSION := }" >> $GITHUB_ENV
51+
52+
- name: Install Go
53+
uses: actions/setup-go@v5
54+
with:
55+
go-version: ${{ env.GOLANG_VERSION }}
56+
57+
- name: Set up Holodeck
58+
uses: NVIDIA/[email protected]
59+
with:
60+
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
61+
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
62+
aws_ssh_key: ${{ secrets.AWS_SSH_KEY }}
63+
holodeck_config: "tests/e2e/infra/aws.yaml"
64+
65+
- name: Get public dns name
66+
id: holodeck_public_dns_name
67+
uses: mikefarah/yq@master
68+
with:
69+
cmd: yq '.status.properties[] | select(.name == "public-dns-name") | .value' /github/workspace/.cache/holodeck.yaml
70+
71+
- name: Run e2e tests
72+
env:
73+
IMAGE_NAME: ghcr.io/nvidia/container-toolkit
74+
VERSION: ${{ inputs.version }}
75+
SSH_KEY: ${{ secrets.AWS_SSH_KEY }}
76+
E2E_SSH_USER: ${{ secrets.E2E_SSH_USER }}
77+
E2E_SSH_HOST: ${{ steps.holodeck_public_dns_name.outputs.result }}
78+
E2E_INSTALL_CTK: "true"
79+
run: |
80+
e2e_ssh_key=$(mktemp)
81+
echo "$SSH_KEY" > "$e2e_ssh_key"
82+
chmod 600 "$e2e_ssh_key"
83+
export E2E_SSH_KEY="$e2e_ssh_key"
84+
85+
make -f tests/e2e/Makefile test
86+
87+
- name: Send Slack alert notification
88+
if: ${{ failure() }}
89+
uses: slackapi/[email protected]
90+
with:
91+
method: chat.postMessage
92+
token: ${{ secrets.SLACK_BOT_TOKEN }}
93+
payload: |
94+
channel: ${{ secrets.SLACK_CHANNEL_ID }}
95+
text: |
96+
:x: On repository ${{ github.repository }}, the Workflow *${{ github.workflow }}* has failed.
97+
98+
Details: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}

.github/workflows/golang.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,14 @@
1515
name: Golang
1616

1717
on:
18+
workflow_call: {}
1819
pull_request:
1920
types:
2021
- opened
2122
- synchronize
2223
branches:
2324
- main
2425
- release-*
25-
push:
26-
branches:
27-
- main
28-
- release-*
2926

3027
jobs:
3128
check:

0 commit comments

Comments
 (0)