mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2025-05-05 20:45:15 +00:00
[no-relnote] Update Github Actions E2E
Some checks failed
Some checks failed
Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
This commit is contained in:
parent
7b0e2ee56d
commit
b3728406e0
13
.github/workflows/e2e.yaml
vendored
13
.github/workflows/e2e.yaml
vendored
@ -70,8 +70,8 @@ jobs:
|
||||
|
||||
- name: Run e2e tests
|
||||
env:
|
||||
IMAGE_NAME: ghcr.io/nvidia/container-toolkit
|
||||
VERSION: ${{ inputs.version }}
|
||||
E2E_IMAGE_REPO: ghcr.io/nvidia/container-toolkit
|
||||
E2E_IMAGE_TAG: ${{ inputs.version }}-ubuntu20.04
|
||||
SSH_KEY: ${{ secrets.AWS_SSH_KEY }}
|
||||
E2E_SSH_USER: ${{ secrets.E2E_SSH_USER }}
|
||||
E2E_SSH_HOST: ${{ steps.holodeck_public_dns_name.outputs.result }}
|
||||
@ -82,7 +82,14 @@ jobs:
|
||||
chmod 600 "$e2e_ssh_key"
|
||||
export E2E_SSH_KEY="$e2e_ssh_key"
|
||||
|
||||
make -f tests/e2e/Makefile test
|
||||
make -f tests/e2e/Makefile test-e2e
|
||||
|
||||
- name: Archive Ginkgo logs
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ginkgo-logs
|
||||
path: ginkgo.json
|
||||
retention-days: 15
|
||||
|
||||
- name: Send Slack alert notification
|
||||
if: ${{ failure() }}
|
||||
|
@ -59,9 +59,10 @@ compatibility runs, and pre‑release validation of new CTK builds.
|
||||
| Variable | Required | Example | Description |
|
||||
|----------|----------|---------|-------------|
|
||||
| `INSTALL_CTK` | ✖ | `true` | When `true` the test installs CTK on the remote host before running the image. When `false` it assumes CTK is already present. |
|
||||
| `TOOLKIT_IMAGE` | ✔ | `nvcr.io/nvidia/cuda:12.4.0-runtime-ubi9` | Image that will be pulled & executed. |
|
||||
| `SSH_KEY` | ✔ | `/home/ci/.ssh/id_rsa` | Private key used for authentication. |
|
||||
| `SSH_USER` | ✔ | `ubuntu` | Username on the remote host. |
|
||||
| `E2E_IMAGE_REPO` | ✔ | `ghcr.io/nvidia/container-toolkit` | Container Toolkit Image |
|
||||
| `E2E_IMAGE_TAG` | ✔ | `latest` | Image tag |
|
||||
| `E2E_SSH_KEY` | ✔ | `/home/ci/.ssh/id_rsa` | Private key used for authentication. |
|
||||
| `E2E_SSH_USER` | ✔ | `ubuntu` | Username on the remote host. |
|
||||
| `REMOTE_HOST` | ✔ | `gpurunner01.corp.local` | Hostname or IP address of the target node. |
|
||||
| `REMOTE_PORT` | ✔ | `22` | SSH port of the target node. |
|
||||
|
||||
|
@ -100,7 +100,7 @@ func getTestEnv() {
|
||||
_, thisFile, _, _ := runtime.Caller(0)
|
||||
packagePath = filepath.Dir(thisFile)
|
||||
|
||||
installCTK = getBoolEnvVar("INSTALL_CTK", false)
|
||||
installCTK = getBoolEnvVar("E2E_INSTALL_CTK", false)
|
||||
|
||||
ImageRepo = os.Getenv("E2E_IMAGE_REPO")
|
||||
Expect(ImageRepo).NotTo(BeEmpty(), "E2E_IMAGE_REPO environment variable must be set")
|
||||
@ -108,17 +108,16 @@ func getTestEnv() {
|
||||
ImageTag = os.Getenv("E2E_IMAGE_TAG")
|
||||
Expect(ImageTag).NotTo(BeEmpty(), "E2E_IMAGE_TAG environment variable must be set")
|
||||
|
||||
sshKey = os.Getenv("SSH_KEY")
|
||||
Expect(sshKey).NotTo(BeEmpty(), "SSH_KEY environment variable must be set")
|
||||
sshKey = os.Getenv("E2E_SSH_KEY")
|
||||
Expect(sshKey).NotTo(BeEmpty(), "E2E_SSH_KEY environment variable must be set")
|
||||
|
||||
sshUser = os.Getenv("SSH_USER")
|
||||
sshUser = os.Getenv("E2E_SSH_USER")
|
||||
Expect(sshUser).NotTo(BeEmpty(), "SSH_USER environment variable must be set")
|
||||
|
||||
host = os.Getenv("REMOTE_HOST")
|
||||
host = os.Getenv("E2E_SSH_HOST")
|
||||
Expect(host).NotTo(BeEmpty(), "REMOTE_HOST environment variable must be set")
|
||||
|
||||
sshPort = os.Getenv("REMOTE_PORT")
|
||||
Expect(sshPort).NotTo(BeEmpty(), "REMOTE_PORT environment variable must be set")
|
||||
sshPort = getIntEnvVar("E2E_SSH_PORT", 22)
|
||||
|
||||
// Get current working directory
|
||||
cwd, err = os.Getwd()
|
||||
@ -137,3 +136,16 @@ func getBoolEnvVar(key string, defaultValue bool) bool {
|
||||
}
|
||||
return boolValue
|
||||
}
|
||||
|
||||
// getIntEnvVar returns the integer value of the environment variable or the default value if not set.
|
||||
func getIntEnvVar(key string, defaultValue int) string {
|
||||
value := os.Getenv(key)
|
||||
if value == "" {
|
||||
return strconv.Itoa(defaultValue)
|
||||
}
|
||||
intValue, err := strconv.Atoi(value)
|
||||
if err != nil {
|
||||
return strconv.Itoa(defaultValue)
|
||||
}
|
||||
return strconv.Itoa(intValue)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user