This repository has been archived by the owner on Oct 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 522
88 lines (88 loc) · 3.51 KB
/
test-cluster-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Test Cluster Config
on:
workflow_dispatch:
inputs:
cluster_config:
description: 'Path to example api model? (e.g., examples/kubernetes-gpu/kubernetes.json)'
required: true
ginkgo_focus:
description: 'E2E tests to run (e.g., "should be able to run a nvidia-gpu job")'
required: false
default: ''
ginkgo_skip:
description: 'E2E tests to skip (e.g., "should have the expected k8s version")'
required: false
default: ''
kubernetes_release:
description: 'Which Kubernetes release to test (major.minor only, e.g., "1.24")'
required: false
default: '1.24'
container_runtime:
description: 'Which CRI to use (e.g., "containerd" or "docker")'
required: false
default: 'containerd'
azure_region:
description: 'Which Azure region to create cluster in (e.g., "westus2")'
required: false
default: 'westus2'
cleanup_on_exit:
description: 'Delete cluster resources after test completes'
required: false
default: true
cleanup_if_fail:
description: 'Delete cluster resources if test fails'
required: false
default: true
from_branch:
description: 'Which branch to run tests from? (default: master)'
required: false
default: 'master'
jobs:
run-e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{github.event.inputs.from_branch}}
- name: validate cluster config
run: ls -la ${{github.event.inputs.cluster_config}}
- name: Setup SSH Keys and known_hosts
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: |
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
- name: install go
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
- name: Install helm
run: |
curl https://baltocdn.com/helm/signing.asc | sudo apt-key add -
sudo apt-get install apt-transport-https --yes
echo "deb https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list
sudo apt-get update
sudo apt-get install helm
- name: Install k
run: |
sudo curl -o /usr/local/bin/k https://raw.githubusercontent.com/jakepearson/k/master/k
sudo chmod +x /usr/local/bin/k
- name: Build aks-engine binary
run: make build-binary
- name: Run E2E
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
ORCHESTRATOR_RELEASE: ${{ github.event.inputs.kubernetes_release }}
CLUSTER_DEFINITION: ${{ github.event.inputs.cluster_config }}
GINKGO_FOCUS: ${{ github.event.inputs.ginkgo_focus }}
GINKGO_SKIP: ${{ github.event.inputs.ginkgo_skip }}
SUBSCRIPTION_ID: ${{ secrets.TEST_AZURE_SUB_ID }}
CLIENT_ID: ${{ secrets.TEST_AZURE_SP_ID }}
CLIENT_SECRET: ${{ secrets.TEST_AZURE_SP_PW }}
LOCATION: ${{ github.event.inputs.azure_region }}
TENANT_ID: ${{ secrets.TEST_AZURE_TENANT_ID }}
CLEANUP_ON_EXIT: ${{ github.event.inputs.cleanup_on_exit }}
CLEANUP_IF_FAIL: ${{ github.event.inputs.cleanup_if_fail }}
CONTAINER_RUNTIME: ${{ github.event.inputs.container_runtime }}
SKIP_LOGS_COLLECTION: true
AZURE_CORE_ONLY_SHOW_ERRORS: True
run: make test-kubernetes