Skip to content
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
38 changes: 7 additions & 31 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,49 +55,25 @@ jobs:
aws_ssh_key: ${{ secrets.AWS_SSH_KEY }}
holodeck_config: "tests/e2e/infra/aws.yaml"

- name: Get public dns name
id: get_public_dns_name
uses: mikefarah/yq@v4
with:
cmd: yq '.status.properties[] | select(.name == "public-dns-name") | .value' /github/workspace/.cache/holodeck.yaml

- name: Set test environment
env:
PUBLIC_DNS_NAME: ${{ steps.get_public_dns_name.outputs.result }}
run: |
echo "instance_hostname=ubuntu@${PUBLIC_DNS_NAME}" >> $GITHUB_ENV
echo "private_key=${{ github.workspace }}/key.pem" >> $GITHUB_ENV

- name: Write SSH key
env:
AWS_SSH_KEY: ${{ secrets.AWS_SSH_KEY }}
run: |
echo "${AWS_SSH_KEY}" > ${private_key} && chmod 400 ${private_key}

- name: Run e2e tests
env:
KUBECONFIG: ${{ github.workspace }}/kubeconfig
HELM_CHART: ${{ github.workspace }}/deployments/helm/nvidia-device-plugin
E2E_IMAGE_REPO: ghcr.io/nvidia/k8s-device-plugin
E2E_IMAGE_TAG: ${{ inputs.version }}
E2E_IMAGE_PULL_POLICY: Always
NVIDIA_DRIVER_ENABLED: true
GOLANG_VERSION: ${{ inputs.golang_version }}
LOG_ARTIFACTS: ${{ github.workspace }}/e2e_logs
LOG_ARTIFACTS_DIR: ${{ github.workspace }}/e2e_logs
run: |
./tests/ci-run-e2e.sh ${E2E_IMAGE_REPO} ${E2E_IMAGE_TAG} ${NVIDIA_DRIVER_ENABLED} ${GOLANG_VERSION} || rc=$?
./tests/scripts/pull.sh /tmp/logs logs
exit $rc
make -f tests/e2e/Makefile test

- name: Archive test logs
if: ${{ failure() }}
uses: actions/upload-artifact@v7
with:
name: e2e-test-logs
path: ./logs/
retention-days: 15

- name: Archive Ginkgo logs
uses: actions/upload-artifact@v7
with:
name: ginkgo-logs
path: ginkgo.json
path: ./e2e_logs/
retention-days: 15

- name: Send Slack alert notification
Expand Down
17 changes: 0 additions & 17 deletions tests/ci-run-e2e.sh

This file was deleted.

2 changes: 1 addition & 1 deletion tests/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ func getTestEnv() {
defer GinkgoRecover()
var err error

Kubeconfig = getEnvVarOrDefault[string]("KUBECONFIG", clientcmd.RecommendedHomeFile)
Kubeconfig = getRequiredEnvvar[string]("KUBECONFIG")

Timeout = time.Duration(getEnvVarOrDefault("E2E_TIMEOUT_SECONDS", 1800)) * time.Second

Expand Down
1 change: 1 addition & 0 deletions tests/e2e/infra/aws.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ spec:
kubernetes:
install: true
installer: kubeadm
remoteAccess: true
31 changes: 0 additions & 31 deletions tests/local.sh

This file was deleted.

15 changes: 0 additions & 15 deletions tests/scripts/.definitions.sh

This file was deleted.

5 changes: 0 additions & 5 deletions tests/scripts/.local.sh

This file was deleted.

7 changes: 0 additions & 7 deletions tests/scripts/.rsync-excludes

This file was deleted.

30 changes: 0 additions & 30 deletions tests/scripts/prerequisites.sh

This file was deleted.

12 changes: 0 additions & 12 deletions tests/scripts/pull.sh

This file was deleted.

12 changes: 0 additions & 12 deletions tests/scripts/push.sh

This file was deleted.

7 changes: 0 additions & 7 deletions tests/scripts/remote.sh

This file was deleted.

16 changes: 0 additions & 16 deletions tests/scripts/sync.sh

This file was deleted.

Loading