forked from Azure/aks-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
174 lines (172 loc) · 6.79 KB
/
release.yaml
File metadata and controls
174 lines (172 loc) · 6.79 KB
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
name: Release
on:
push:
branches:
- release-*
paths:
- 'releases/CHANGELOG*.md'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: set env
run: |
export CURRENT_BRANCH=$(git branch --show-current)
echo "RELEASE_VERSION=${CURRENT_BRANCH:8}" >> $GITHUB_ENV # release-v1.0.0 substring starting at v1.0.0
- name: Validate tag does not already exist
run: |
if [[ $(git tag -l ${{ env.RELEASE_VERSION }}) ]]; then
exit 1
fi
- 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: Validate CHANGELOG # We require a pre-existing CHANGELOG specific for this release in order to proceed
run: |
[ -s releases/CHANGELOG-${{ env.RELEASE_VERSION }}.md ]
- 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: print git status after build
run: |
git status
- name: Validate gpu + docker scenario
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
ORCHESTRATOR_RELEASE: "1.23"
CLUSTER_DEFINITION: "examples/kubernetes-gpu/kubernetes.json"
GINKGO_FOCUS: "should be able to run a nvidia-gpu job"
SUBSCRIPTION_ID: ${{ secrets.TEST_AZURE_SUB_ID }}
CLIENT_ID: ${{ secrets.TEST_AZURE_SP_ID }}
CLIENT_SECRET: ${{ secrets.TEST_AZURE_SP_PW }}
LOCATION: "westus2"
TENANT_ID: ${{ secrets.TEST_AZURE_TENANT_ID }}
CLEANUP_ON_EXIT: true
CLEANUP_IF_FAIL: true
CONTAINER_RUNTIME: "docker"
BLOCK_SSH: true
SKIP_LOGS_COLLECTION: true
AZURE_CORE_ONLY_SHOW_ERRORS: True
run: make test-kubernetes
- name: Validate gpu + containerd scenario
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
ORCHESTRATOR_RELEASE: "1.23"
CLUSTER_DEFINITION: "examples/kubernetes-gpu/kubernetes.json"
GINKGO_FOCUS: "should be able to run a nvidia-gpu job"
SUBSCRIPTION_ID: ${{ secrets.TEST_AZURE_SUB_ID }}
CLIENT_ID: ${{ secrets.TEST_AZURE_SP_ID }}
CLIENT_SECRET: ${{ secrets.TEST_AZURE_SP_PW }}
LOCATION: "westus2"
TENANT_ID: ${{ secrets.TEST_AZURE_TENANT_ID }}
CLEANUP_ON_EXIT: true
CLEANUP_IF_FAIL: true
CONTAINER_RUNTIME: "containerd"
BLOCK_SSH: true
SKIP_LOGS_COLLECTION: true
AZURE_CORE_ONLY_SHOW_ERRORS: True
run: make test-kubernetes
- name: Validate 1.22 + containerd E2E
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
ORCHESTRATOR_RELEASE: "1.23"
CLUSTER_DEFINITION: "examples/e2e-tests/kubernetes/release/default/definition.json"
SUBSCRIPTION_ID: ${{ secrets.TEST_AZURE_SUB_ID }}
CLIENT_ID: ${{ secrets.TEST_AZURE_SP_ID }}
CLIENT_SECRET: ${{ secrets.TEST_AZURE_SP_PW }}
LOCATION: "eastus"
TENANT_ID: ${{ secrets.TEST_AZURE_TENANT_ID }}
CREATE_VNET: true
CLEANUP_ON_EXIT: true
CLEANUP_IF_FAIL: true
GINKGO_SKIP: ""
STABILITY_ITERATIONS: "0"
RETAIN_SSH: false
CONTAINER_RUNTIME: "containerd"
BLOCK_SSH: true
SKIP_LOGS_COLLECTION: true
AZURE_CORE_ONLY_SHOW_ERRORS: True
run: make test-kubernetes
- name: Validate 1.23 + containerd E2E
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
ORCHESTRATOR_RELEASE: "1.23"
CLUSTER_DEFINITION: "examples/e2e-tests/kubernetes/release/default/definition.json"
SUBSCRIPTION_ID: ${{ secrets.TEST_AZURE_SUB_ID }}
CLIENT_ID: ${{ secrets.TEST_AZURE_SP_ID }}
CLIENT_SECRET: ${{ secrets.TEST_AZURE_SP_PW }}
LOCATION: "eastus"
TENANT_ID: ${{ secrets.TEST_AZURE_TENANT_ID }}
CREATE_VNET: true
CLEANUP_ON_EXIT: true
CLEANUP_IF_FAIL: true
GINKGO_SKIP: ""
STABILITY_ITERATIONS: "0"
RETAIN_SSH: false
CONTAINER_RUNTIME: "containerd"
BLOCK_SSH: true
SKIP_LOGS_COLLECTION: true
AZURE_CORE_ONLY_SHOW_ERRORS: True
run: make test-kubernetes
- name: Validate 1.24 + containerd E2E
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
ORCHESTRATOR_RELEASE: "1.23"
CLUSTER_DEFINITION: "examples/e2e-tests/kubernetes/release/default/definition.json"
SUBSCRIPTION_ID: ${{ secrets.TEST_AZURE_SUB_ID }}
CLIENT_ID: ${{ secrets.TEST_AZURE_SP_ID }}
CLIENT_SECRET: ${{ secrets.TEST_AZURE_SP_PW }}
LOCATION: "eastus"
TENANT_ID: ${{ secrets.TEST_AZURE_TENANT_ID }}
CREATE_VNET: true
CLEANUP_ON_EXIT: true
CLEANUP_IF_FAIL: true
GINKGO_SKIP: ""
STABILITY_ITERATIONS: "0"
RETAIN_SSH: false
CONTAINER_RUNTIME: "containerd"
BLOCK_SSH: true
SKIP_LOGS_COLLECTION: true
AZURE_CORE_ONLY_SHOW_ERRORS: True
run: make test-kubernetes
- name: Remove untracked files created during workflow steps
run: git ls-files --others --exclude-standard -z | xargs -0 -r rm
- name: Add local tag
run: git tag ${{ env.RELEASE_VERSION }}
- name: print and validate git status before producing binaries
run: |
git status
git status | grep 'working tree clean'
- name: clean all unstaged changes
run: |
git checkout -- .
- name: Build Artifacts
run: |
make dist
- name: Remove local tag
run: git tag -d ${{ env.RELEASE_VERSION }}
- name: Publish Release
uses: ncipollo/release-action@v1
with:
artifacts: _dist/aks-engine*-*-*.*
bodyFile: releases/CHANGELOG-${{ env.RELEASE_VERSION }}.md
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ env.RELEASE_VERSION }}