-
Notifications
You must be signed in to change notification settings - Fork 6
237 lines (206 loc) · 12 KB
/
main.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
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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
name: rancher-airgap-workflow
on:
push:
tags:
- '*'
jobs:
rancher-airgap-build:
name: Rancher Airgap - Build Job
runs-on: [self-hosted, linux, X64, general]
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
ref: main
token: ${{ secrets.GITHUB_TOKEN }}
- name: Dependencies/Setup/Checks
run: |
hauler version
pwd && ls -lh
- name: Build Hauler
run: |
sh hauler/scripts/hauler/hauler-hauler.sh
mv /opt/rancher/hauler/hauler/rancher-airgap-hauler.yaml hauler/hauler/rancher-airgap-hauler.yaml
pwd && ls -la hauler/hauler
- name: Build Helm
run: |
sh hauler/scripts/helm/hauler-helm.sh
mv /opt/rancher/hauler/helm/rancher-airgap-helm.yaml hauler/helm/rancher-airgap-helm.yaml
pwd && ls -la hauler/helm
- name: Build Cosign
run: |
sh hauler/scripts/cosign/hauler-cosign.sh
mv /opt/rancher/hauler/cosign/rancher-airgap-cosign.yaml hauler/cosign/rancher-airgap-cosign.yaml
pwd && ls -la hauler/cosign
- name: Build RKE2
run: |
sh hauler/scripts/rke2/hauler-rke2.sh
mv /opt/rancher/hauler/rke2/rancher-airgap-rke2.yaml hauler/rke2/rancher-airgap-rke2.yaml
pwd && ls -la hauler/rke2
- name: Build Rancher
run: |
sh hauler/scripts/rancher/hauler-rancher.sh
mv /opt/rancher/hauler/rancher/rancher-airgap-rancher.yaml hauler/rancher/rancher-airgap-rancher.yaml
pwd && ls -la hauler/rancher
- name: Build Rancher Minimal
run: |
sh hauler/scripts/rancher/hauler-rancher-minimal.sh
mv /opt/rancher/hauler/rancher-minimal/rancher-airgap-rancher-minimal.yaml hauler/rancher/rancher-airgap-rancher-minimal.yaml
pwd && ls -la hauler/rancher
- name: Build Longhorn
run: |
sh hauler/scripts/longhorn/hauler-longhorn.sh
mv /opt/rancher/hauler/longhorn/rancher-airgap-longhorn.yaml hauler/longhorn/rancher-airgap-longhorn.yaml
pwd && ls -la hauler/longhorn
- name: Build NeuVector
run: |
sh hauler/scripts/neuvector/hauler-neuvector.sh
mv /opt/rancher/hauler/neuvector/rancher-airgap-neuvector.yaml hauler/neuvector/rancher-airgap-neuvector.yaml
pwd && ls -la hauler/neuvector
- name: Build Harvester
run: |
sh hauler/scripts/harvester/hauler-harvester.sh
mv /opt/rancher/hauler/harvester/rancher-airgap-harvester.yaml hauler/harvester/rancher-airgap-harvester.yaml
pwd && ls -la hauler/harvester
- name: Build Harbor
run: |
sh hauler/scripts/harbor/hauler-harbor.sh
mv /opt/rancher/hauler/harbor/rancher-airgap-harbor.yaml hauler/harbor/rancher-airgap-harbor.yaml
pwd && ls -la hauler/harbor
- name: Build KubeVip
run: |
sh hauler/scripts/kubevip/hauler-kubevip.sh
mv /opt/rancher/hauler/kubevip/rancher-airgap-kubevip.yaml hauler/kubevip/rancher-airgap-kubevip.yaml
pwd && ls -la hauler/kubevip
- name: Commit and Push Repository
continue-on-error: true
run: |
pwd && ls -la
git status
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git add *.yaml
git commit -a -m "updated rancher airgap assets [github-actions]"
git push
rancher-airgap-testing:
name: Rancher Airgap - Test/Lint Job
runs-on: [self-hosted, linux, X64, general]
needs: [rancher-airgap-build]
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
ref: main
token: ${{ secrets.GITHUB_TOKEN }}
- name: Dependencies/Setup/Checks
run: |
hauler version
pwd && ls -lh
- name: Test/Lint Hauler
run: |
cd hauler/hauler
hauler store sync -f rancher-airgap-hauler.yaml
hauler store save -f hauler.tar.zst
hauler store info
ls -lh && rm -rf store hauler.tar.zst
- name: Test/Lint Helm
run: |
cd hauler/helm
hauler store sync -f rancher-airgap-helm.yaml
hauler store save -f helm.tar.zst
hauler store info
ls -lh && rm -rf store helm.tar.zst
- name: Test/Lint Cosign
run: |
cd hauler/cosign
hauler store sync -f rancher-airgap-cosign.yaml
hauler store save -f cosign.tar.zst
hauler store info
ls -lh && rm -rf store cosign.tar.zst
- name: Test/Lint RKE2
run: |
cd hauler/rke2
hauler store sync -f rancher-airgap-rke2.yaml --platform linux/amd64
hauler store save -f rke2.tar.zst
hauler store info
ls -lh && rm -rf store rke2.tar.zst
- name: Test/Lint Rancher
run: |
cd hauler/rancher
hauler store sync -f rancher-airgap-rancher.yaml --platform linux/amd64
hauler store save -f rancher.tar.zst
hauler store info
ls -lh && rm -rf store rancher.tar.zst
- name: Test/Lint Rancher Minimal
run: |
cd hauler/rancher
rm -rf store
hauler store sync -f rancher-airgap-rancher-minimal.yaml --platform linux/amd64
hauler store save -f rancher-minimal.tar.zst
hauler store info
ls -lh && rm -rf store rancher-minimal.tar.zst
- name: Test/Lint Longhorn
run: |
cd hauler/longhorn
hauler store sync -f rancher-airgap-longhorn.yaml --platform linux/amd64
hauler store save -f longhorn.tar.zst
hauler store info
ls -lh && rm -rf store longhorn.tar.zst
- name: Test/Lint NeuVector
run: |
cd hauler/neuvector
hauler store sync -f rancher-airgap-neuvector.yaml --platform linux/amd64
hauler store save -f neuvector.tar.zst
hauler store info
ls -lh && rm -rf store neuvector.tar.zst
- name: Test/Lint Harvester
run: |
cd hauler/harvester
hauler store sync -f rancher-airgap-harvester.yaml --platform linux/amd64
hauler store save -f harvester.tar.zst
hauler store info
ls -lh && rm -rf store harvester.tar.zst
- name: Test/Lint Harbor
run: |
cd hauler/harbor
hauler store sync -f rancher-airgap-harbor.yaml --platform linux/amd64
hauler store save -f harbor.tar.zst
hauler store info
ls -lh && rm -rf store harbor.tar.zst
- name: Test/Lint KubeVip
run: |
cd hauler/kubevip
hauler store sync -f rancher-airgap-kubevip.yaml --platform linux/amd64
hauler store save -f kubevip.tar.zst
hauler store info
ls -lh && rm -rf store kubevip.tar.zst
rancher-airgap-release:
name: Rancher Airgap - Release Job
runs-on: [self-hosted, linux, X64, general]
needs: [rancher-airgap-testing]
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
ref: main
token: ${{ secrets.GITHUB_TOKEN }}
- name: Dependencies/Setup/Checks
run: |
hauler version
pwd && ls -la
- name: Create Release Notes
run: |
echo -e "# Rancher Airgap Release ${GITHUB_REF##*/}\nWe are excited about this latest release of Rancher Airgap! Please review all of the releases notes below and always ensure to download the correct assets. Please utilize GitHub Issues, Forks, and Pull Requests to submit any issues, updates, or fixes! Thank you.\n\nThese Release Notes were generated automatically by [github-actions](https://github.com/apps/github-actions).\n\n## Upgrade Steps\n* No upgrade steps for this release.\n\n## Breaking Changes\n* No breaking changes for this release.\n\n## Features and Improvements\n* No features or improvements for this release.\n\n## Bug Fixes and Additional Notes\n* No bug fixes or additional notes for this release.\n\n## Release Assets for the Rancher Airgap\n\n### Hauler (by Rancher Government Solutions)\n* **Hauler Manifest ->** [rancher-airgap-hauler.yaml](https://github.com/zackbradys/rancher-airgap/blob/main/hauler/hauler/rancher-airgap-hauler.yaml)\n* \`curl -sfOL https://raw.githubusercontent.com/zackbradys/rancher-airgap/main/hauler/hauler/rancher-airgap-hauler.yaml\`\n\n### Rancher Kubernetes Engine 2 (by Rancher)\n* **Hauler Manifest ->** [rancher-airgap-rke2.yaml](https://github.com/zackbradys/rancher-airgap/blob/main/hauler/rke2/rancher-airgap-rke2.yaml)\n* \`curl -sfOL https://raw.githubusercontent.com/zackbradys/rancher-airgap/main/hauler/rke2/rancher-airgap-rke2.yaml\`\n\n### Rancher Multi-Cluster-Manager (by Rancher)\n* **Hauler Manifest ->** [rancher-airgap-rancher.yaml](https://github.com/zackbradys/rancher-airgap/blob/main/hauler/rancher/rancher-airgap-rancher.yaml)\n* \`curl -sfOL https://raw.githubusercontent.com/zackbradys/rancher-airgap/main/hauler/rancher/rancher-airgap-rancher.yaml\`\n* **(Minimal) Hauler Manifest ->** [rancher-airgap-rancher-minimal.yaml](https://github.com/zackbradys/rancher-airgap/blob/main/hauler/rancher/rancher-airgap-rancher-minimal.yaml)\n* \`curl -sfOL https://raw.githubusercontent.com/zackbradys/rancher-airgap/main/hauler/rancher/rancher-airgap-rancher-minimal.yaml\`\n\n### Rancher Longhorn (by Rancher)\n* **Hauler Manifest ->** [rancher-airgap-longhorn.yaml](https://github.com/zackbradys/rancher-airgap/blob/main/hauler/longhorn/rancher-airgap-longhorn.yaml)\n* \`curl -sfOL https://raw.githubusercontent.com/zackbradys/rancher-airgap/main/hauler/longhorn/rancher-airgap-longhorn.yaml\`\n\n### Rancher NeuVector (by Rancher)\n* **Hauler Manifest ->** [rancher-airgap-neuvector.yaml](https://github.com/zackbradys/rancher-airgap/blob/main/hauler/neuvector/rancher-airgap-neuvector.yaml)\n* \`curl -sfOL https://raw.githubusercontent.com/zackbradys/rancher-airgap/main/hauler/neuvector/rancher-airgap-neuvector.yaml\`\n\n### Rancher Harvester (by Rancher)\n* **Hauler Manifest ->** [rancher-airgap-harvester.yaml](https://github.com/zackbradys/rancher-airgap/blob/main/hauler/harvester/rancher-airgap-harvester.yaml)\n* \`curl -sfOL https://raw.githubusercontent.com/zackbradys/rancher-airgap/main/hauler/harvester/rancher-airgap-harvester.yaml\`\n\n### Helm (by the CNCF)\n* **Hauler Manifest ->** [rancher-airgap-helm.yaml](https://github.com/zackbradys/rancher-airgap/blob/main/hauler/helm/rancher-airgap-helm.yaml)\n* \`curl -sfOL https://raw.githubusercontent.com/zackbradys/rancher-airgap/main/hauler/helm/rancher-airgap-helm.yaml\`\n\n### Cosign (by Sigstore)\n* **Hauler Manifest ->** [rancher-airgap-cosign.yaml](https://github.com/zackbradys/rancher-airgap/blob/main/hauler/cosign/rancher-airgap-cosign.yaml)\n* \`curl -sfOL https://raw.githubusercontent.com/zackbradys/rancher-airgap/main/hauler/cosign/rancher-airgap-cosign.yaml\`\n\n### Harbor (by the CNCF)\n* **Hauler Manifest ->** [rancher-airgap-harbor.yaml](https://github.com/zackbradys/rancher-airgap/blob/main/hauler/harbor/rancher-airgap-harbor.yaml)\n* \`curl -sfOL https://raw.githubusercontent.com/zackbradys/rancher-airgap/main/hauler/harbor/rancher-airgap-harbor.yaml\`\n\n### KubeVip (by the CNCF)\n* **Hauler Manifest ->** [rancher-airgap-kubevip.yaml](https://github.com/zackbradys/rancher-airgap/blob/main/hauler/kubevip/rancher-airgap-kubevip.yaml)\n* \`curl -sfOL https://raw.githubusercontent.com/zackbradys/rancher-airgap/main/hauler/kubevip/rancher-airgap-kubevip.yaml\`" > RELEASE-NOTES.MD
echo "Previewing Release Notes"
cat RELEASE-NOTES.MD
- name: Release with Release Notes
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
body_path: RELEASE-NOTES.MD