-
Notifications
You must be signed in to change notification settings - Fork 6
629 lines (557 loc) · 39.6 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
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
name: rancher-airgap-workflow
on:
workflow_dispatch:
push:
tags:
- '*'
jobs:
rancher-airgap-build:
name: Rancher Airgap - Build Job
runs-on: [self-hosted, linux, X64]
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: main
token: ${{ secrets.GITHUB_TOKEN }}
- name: Dependencies/Setup/Checks
run: |
source ~/.bashrc
hauler version
pwd && ls -laR
- name: Build Hauler
run: |
sh hauler/scripts/hauler/hauler-hauler.sh
mv /opt/hauler/hauler/rancher-airgap-hauler.yaml hauler/hauler/rancher-airgap-hauler.yaml
pwd && ls -laR hauler/hauler
- name: Build Helm
run: |
sh hauler/scripts/helm/hauler-helm.sh
mv /opt/hauler/helm/rancher-airgap-helm.yaml hauler/helm/rancher-airgap-helm.yaml
pwd && ls -laR hauler/helm
- name: Build Cosign
run: |
sh hauler/scripts/cosign/hauler-cosign.sh
mv /opt/hauler/cosign/rancher-airgap-cosign.yaml hauler/cosign/rancher-airgap-cosign.yaml
pwd && ls -laR hauler/cosign
- name: Build RKE2
run: |
sh hauler/scripts/rke2/hauler-rke2.sh
mv /opt/hauler/rke2/rancher-airgap-rke2.yaml hauler/rke2/rancher-airgap-rke2.yaml
pwd && ls -laR hauler/rke2
- name: Build Rancher
run: |
sh hauler/scripts/rancher/hauler-rancher.sh
mv /opt/hauler/rancher/rancher-airgap-rancher.yaml hauler/rancher/rancher-airgap-rancher.yaml
pwd && ls -laR hauler/rancher
- name: Build Rancher Minimal
run: |
sh hauler/scripts/rancher/hauler-rancher-minimal.sh
mv /opt/hauler/rancher-minimal/rancher-airgap-rancher-minimal.yaml hauler/rancher/rancher-airgap-rancher-minimal.yaml
pwd && ls -laR hauler/rancher
- name: Build Longhorn
run: |
sh hauler/scripts/longhorn/hauler-longhorn.sh
mv /opt/hauler/longhorn/rancher-airgap-longhorn.yaml hauler/longhorn/rancher-airgap-longhorn.yaml
pwd && ls -laR hauler/longhorn
- name: Build NeuVector
run: |
sh hauler/scripts/neuvector/hauler-neuvector.sh
mv /opt/hauler/neuvector/rancher-airgap-neuvector.yaml hauler/neuvector/rancher-airgap-neuvector.yaml
pwd && ls -laR hauler/neuvector
- name: Build Harvester
run: |
sh hauler/scripts/harvester/hauler-harvester.sh
mv /opt/hauler/harvester/rancher-airgap-harvester.yaml hauler/harvester/rancher-airgap-harvester.yaml
pwd && ls -laR hauler/harvester
- name: Build Gitea
run: |
sh hauler/scripts/gitea/hauler-gitea.sh
mv /opt/hauler/gitea/rancher-airgap-gitea.yaml hauler/gitea/rancher-airgap-gitea.yaml
pwd && ls -laR hauler/gitea
- name: Build KubeVip
run: |
sh hauler/scripts/kubevip/hauler-kubevip.sh
mv /opt/hauler/kubevip/rancher-airgap-kubevip.yaml hauler/kubevip/rancher-airgap-kubevip.yaml
pwd && ls -laR hauler/kubevip
- name: Build Vault
run: |
sh hauler/scripts/vault/hauler-vault.sh
mv /opt/hauler/vault/rancher-airgap-vault.yaml hauler/vault/rancher-airgap-vault.yaml
pwd && ls -laR hauler/vault
- name: Commit and Push Repository
continue-on-error: true
run: |
pwd && ls -laR
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]
needs: [rancher-airgap-build]
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: main
token: ${{ secrets.GITHUB_TOKEN }}
- name: Dependencies/Setup/Checks
run: |
source ~/.bashrc
hauler version
pwd && ls -laR
- name: Test/Lint Hauler
run: |
cd hauler/hauler
time hauler store sync --files rancher-airgap-hauler.yaml
time hauler store save --filename hauler.tar.zst
hauler store info
ls -laR
- name: Test/Lint Helm
run: |
cd hauler/helm
time hauler store sync --files rancher-airgap-helm.yaml
time hauler store save --filename helm.tar.zst
hauler store info
ls -laR
- name: Test/Lint Cosign
run: |
cd hauler/cosign
time hauler store sync --files rancher-airgap-cosign.yaml
time hauler store save --filename cosign.tar.zst
hauler store info
ls -laR
- name: Test/Lint RKE2
run: |
cd hauler/rke2
time hauler store sync --files rancher-airgap-rke2.yaml
time hauler store save --filename rke2.tar.zst
hauler store info
ls -laR
- name: Test/Lint Rancher
run: |
cd hauler/rancher
time hauler store sync --files rancher-airgap-rancher.yaml
time hauler store save --filename rancher.tar.zst
hauler store info
ls -laR
- name: Test/Lint Rancher Minimal
run: |
cd hauler/rancher
rm -rf store
time hauler store sync --files rancher-airgap-rancher-minimal.yaml
time hauler store save --filename rancher-minimal.tar.zst
hauler store info
ls -laR
- name: Test/Lint Longhorn
run: |
cd hauler/longhorn
time hauler store sync --files rancher-airgap-longhorn.yaml
time hauler store save --filename longhorn.tar.zst
hauler store info
ls -laR
- name: Test/Lint NeuVector
run: |
cd hauler/neuvector
time hauler store sync --files rancher-airgap-neuvector.yaml
time hauler store save --filename neuvector.tar.zst
hauler store info
ls -laR
- name: Test/Lint Harvester
run: |
cd hauler/harvester
time hauler store sync --files rancher-airgap-harvester.yaml
time hauler store save --filename harvester.tar.zst
hauler store info
ls -laR
- name: Test/Lint Gitea
run: |
cd hauler/gitea
time hauler store sync --files rancher-airgap-gitea.yaml
time hauler store save --filename gitea.tar.zst
hauler store info
ls -laR
- name: Test/Lint KubeVip
run: |
cd hauler/kubevip
time hauler store sync --files rancher-airgap-kubevip.yaml
time hauler store save --filename kubevip.tar.zst
hauler store info
ls -laR
- name: Test/Lint Vault
run: |
cd hauler/vault
time hauler store sync --files rancher-airgap-vault.yaml
time hauler store save --filename vault.tar.zst
hauler store info
ls -laR
rancher-airgap-release:
name: Rancher Airgap - Release Job
runs-on: [self-hosted, linux, X64]
needs: [rancher-airgap-build, rancher-airgap-testing]
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: main
token: ${{ secrets.GITHUB_TOKEN }}
- name: Dependencies/Setup/Checks
run: |
source ~/.bashrc
hauler version
pwd && ls -laR
- name: Create Release Notes
run: |
echo -e "# Rancher Airgap Release ${{ github.ref_name }}\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### Gitea (by the CNCF)\n* **Hauler Manifest ->** [rancher-airgap-gitea.yaml](https://github.com/zackbradys/rancher-airgap/blob/main/hauler/gitea/rancher-airgap-gitea.yaml)\n* \`curl -sfOL https://raw.githubusercontent.com/zackbradys/rancher-airgap/main/hauler/gitea/rancher-airgap-gitea.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\`\n\n### Vault (by HashiCorp)\n* **Hauler Manifest ->** [rancher-airgap-vault.yaml](https://github.com/zackbradys/rancher-airgap/blob/main/hauler/vault/rancher-airgap-vault.yaml)\n* \`curl -sfOL https://raw.githubusercontent.com/zackbradys/rancher-airgap/main/hauler/vault/rancher-airgap-vault.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
rancher-airgap-private:
name: Rancher Airgap - Private Job
runs-on: [self-hosted, linux, X64]
needs: [rancher-airgap-build]
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: main
token: ${{ secrets.GITHUB_TOKEN }}
- name: Dependencies/Setup/Checks
run: |
source ~/.bashrc
hauler version
pwd && ls -lh
- name: Fetch Public Key
run: |
curl -sfOL https://raw.githubusercontent.com/rancherfederal/carbide-releases/main/carbide-key.pub
- name: Authenticate to Private Registry
run: |
source ~/.bashrc
hauler login ${Registry} --username ${RegistryUsername} --password ${RegistryPassword}
- name: Set Up AWS CLI and Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ${{ secrets.AWS_REGION }}
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Fetch/Build Hauler
run: |
cd hauler/hauler && source ~/.bashrc
source <(grep "export vHauler=" ../scripts/hauler/hauler-hauler.sh)
time hauler store sync --store amd64 --platform linux/amd64 --files rancher-airgap-hauler.yaml
time hauler store sync --store arm64 --platform linux/arm64 --files rancher-airgap-hauler.yaml
time hauler store save --store amd64 --platform linux/amd64 --filename hauler-carbide-v${vHauler}-amd64.tar.zst
time hauler store save --store arm64 --platform linux/arm64 --filename hauler-carbide-v${vHauler}-arm64.tar.zst
hauler store info --store amd64
hauler store info --store arm64
- name: Fetch/Build Helm
run: |
cd hauler/helm && source ~/.bashrc
source <(grep "export vHelm=" ../scripts/helm/hauler-helm.sh)
time hauler store sync --store amd64 --platform linux/amd64 --files rancher-airgap-helm.yaml
time hauler store sync --store arm64 --platform linux/arm64 --files rancher-airgap-helm.yaml
time hauler store save --store amd64 --platform linux/amd64 --filename helm-carbide-v${vHelm}-amd64.tar.zst
time hauler store save --store arm64 --platform linux/arm64 --filename helm-carbide-v${vHelm}-arm64.tar.zst
hauler store info --store amd64
hauler store info --store arm64
- name: Fetch/Build Cosign
run: |
cd hauler/cosign && source ~/.bashrc
source <(grep "export vCosign=" ../scripts/cosign/hauler-cosign.sh)
time hauler store sync --store amd64 --platform linux/amd64 --files rancher-airgap-cosign.yaml
time hauler store sync --store arm64 --platform linux/arm64 --files rancher-airgap-cosign.yaml
time hauler store save --store amd64 --platform linux/amd64 --filename cosign-carbide-v${vCosign}-amd64.tar.zst
time hauler store save --store arm64 --platform linux/arm64 --filename cosign-carbide-v${vCosign}-arm64.tar.zst
hauler store info --store amd64
hauler store info --store arm64
- name: Fetch/Build RKE2
run: |
cd hauler/rke2 && source ~/.bashrc
source <(grep "export vRKE2=" ../scripts/rke2/hauler-rke2.sh)
time hauler store sync --store amd64 --registry ${Registry} --key ../../carbide-key.pub --platform linux/amd64 --files rancher-airgap-rke2.yaml
time hauler store sync --store arm64 --registry ${Registry} --key ../../carbide-key.pub --platform linux/arm64 --files rancher-airgap-rke2.yaml
time hauler store save --store amd64 --platform linux/amd64 --filename rke2-carbide-v${vRKE2}-amd64.tar.zst
time hauler store save --store arm64 --platform linux/arm64 --filename rke2-carbide-v${vRKE2}-arm64.tar.zst
hauler store info --store amd64
hauler store info --store arm64
- name: Fetch/Build Rancher
run: |
cd hauler/rancher && source ~/.bashrc
source <(grep "export vRancher=" ../scripts/rancher/hauler-rancher.sh)
sed -i 's#quay.io/##g' rancher-airgap-rancher.yaml
sed -i 's#https://releases.rancher.com/server-charts/latest#https://rancherfederal.github.io/carbide-charts#g' rancher-airgap-rancher.yaml
time hauler store sync --store amd64 --registry ${Registry} --key ../../carbide-key.pub --platform linux/amd64 --files rancher-airgap-rancher.yaml
time hauler store sync --store arm64 --registry ${Registry} --key ../../carbide-key.pub --platform linux/arm64 --files rancher-airgap-rancher.yaml
time hauler store save --store amd64 --platform linux/amd64 --filename rancher-carbide-v${vRancher}-amd64.tar.zst
time hauler store save --store arm64 --platform linux/arm64 --filename rancher-carbide-v${vRancher}-arm64.tar.zst
hauler store info --store amd64
hauler store info --store arm64
- name: Fetch/Build Rancher Minimal
run: |
cd hauler/rancher && source ~/.bashrc
source <(grep "export vRancher=" ../scripts/rancher/hauler-rancher-minimal.sh)
rm -rf store amd64 arm64
sed -i 's#quay.io/##g' rancher-airgap-rancher-minimal.yaml
sed -i 's#https://releases.rancher.com/server-charts/latest#https://rancherfederal.github.io/carbide-charts#g' rancher-airgap-rancher-minimal.yaml
time hauler store sync --store amd64 --registry ${Registry} --key ../../carbide-key.pub --platform linux/amd64 --files rancher-airgap-rancher-minimal.yaml
time hauler store sync --store arm64 --registry ${Registry} --key ../../carbide-key.pub --platform linux/arm64 --files rancher-airgap-rancher-minimal.yaml
time hauler store save --store amd64 --platform linux/amd64 --filename rancher-minimal-carbide-v${vRancher}-amd64.tar.zst
time hauler store save --store arm64 --platform linux/arm64 --filename rancher-minimal-carbide-v${vRancher}-arm64.tar.zst
hauler store info --store amd64
hauler store info --store arm64
- name: Fetch/Build Longhorn
run: |
cd hauler/longhorn && source ~/.bashrc
source <(grep "export vLonghorn=" ../scripts/longhorn/hauler-longhorn.sh)
time hauler store sync --store amd64 --registry ${Registry} --key ../../carbide-key.pub --platform linux/amd64 --files rancher-airgap-longhorn.yaml
time hauler store sync --store arm64 --registry ${Registry} --key ../../carbide-key.pub --platform linux/arm64 --files rancher-airgap-longhorn.yaml
time hauler store save --store amd64 --platform linux/amd64 --filename longhorn-carbide-v${vLonghorn}-amd64.tar.zst
time hauler store save --store arm64 --platform linux/arm64 --filename longhorn-carbide-v${vLonghorn}-arm64.tar.zst
hauler store info --store amd64
hauler store info --store arm64
- name: Fetch/Build NeuVector
run: |
cd hauler/neuvector && source ~/.bashrc
source <(grep "export vNeuVector=" ../scripts/neuvector/hauler-neuvector.sh)
time hauler store sync --store amd64 --registry ${Registry} --key ../../carbide-key.pub --platform linux/amd64 --files rancher-airgap-neuvector.yaml
time hauler store sync --store arm64 --registry ${Registry} --key ../../carbide-key.pub --platform linux/arm64 --files rancher-airgap-neuvector.yaml
time hauler store save --store amd64 --platform linux/amd64 --filename neuvector-carbide-v${vNeuVector}-amd64.tar.zst
time hauler store save --store arm64 --platform linux/arm64 --filename neuvector-carbide-v${vNeuVector}-arm64.tar.zst
hauler store info --store amd64
hauler store info --store arm64
- name: Fetch/Build Harvester
run: |
cd hauler/harvester && source ~/.bashrc
source <(grep "export vHarvester=" ../scripts/harvester/hauler-harvester.sh)
sed -e "s#quay.io/##g" -e "s#ghcr.io/##g" -e "s#registry.k8s.io/##g" -e "s#registry.suse.com/##g" rancher-airgap-harvester.yaml > rancher-airgap-harvester-amd64.yaml
sed -e "s#quay.io/##g" -e "s#ghcr.io/##g" -e "s#registry.k8s.io/##g" -e "s#registry.suse.com/##g" rancher-airgap-harvester.yaml > rancher-airgap-harvester-arm64.yaml
sed -i "1,/---/c\apiVersion: content.hauler.cattle.io/v1alpha1\nkind: Images\nmetadata:\n name: rancher-airgap-images-harvester\nspec:\n images:\n - name: ${Registry}/carbide/harvester/harvester-v1.3.2-govt.1-amd64.iso:v1.3.2-govt.1\n - name: ${Registry}/carbide/harvester/harvester-v1.3.2-govt.1-amd64-net-install.iso:v1.3.2-govt.1\n - name: ${Registry}/carbide/harvester/harvester-v1.3.2-govt.1-vmlinuz-amd64:v1.3.2-govt.1\n - name: ${Registry}/carbide/harvester/harvester-v1.3.2-govt.1-initrd-amd64:v1.3.2-govt.1\n - name: ${Registry}/carbide/harvester/harvester-v1.3.2-govt.1-rootfs-amd64.squashfs:v1.3.2-govt.1\n - name: ${Registry}/carbide/harvester/harvester-v1.3.2-govt.1-amd64.sha512:v1.3.2-govt.1\n---" rancher-airgap-harvester-amd64.yaml
sed -i "1,/---/c\apiVersion: content.hauler.cattle.io/v1alpha1\nkind: Images\nmetadata:\n name: rancher-airgap-images-harvester\nspec:\n images:\n - name: ${Registry}/carbide/harvester/harvester-v1.3.2-govt.1-arm64.iso:v1.3.2-govt.1\n - name: ${Registry}/carbide/harvester/harvester-v1.3.2-govt.1-vmlinuz-arm64:v1.3.2-govt.1\n - name: ${Registry}/carbide/harvester/harvester-v1.3.2-govt.1-initrd-arm64:v1.3.2-govt.1\n - name: ${Registry}/carbide/harvester/harvester-v1.3.2-govt.1-rootfs-arm64.squashfs:v1.3.2-govt.1\n - name: ${Registry}/carbide/harvester/harvester-v1.3.2-govt.1-arm64.sha512:v1.3.2-govt.1\n---" rancher-airgap-harvester-arm64.yaml
time hauler store sync --store amd64 --registry ${Registry} --key ../../carbide-key.pub --platform linux/amd64 --files rancher-airgap-harvester-amd64.yaml
time hauler store sync --store arm64 --registry ${Registry} --key ../../carbide-key.pub --platform linux/arm64 --files rancher-airgap-harvester-arm64.yaml
time hauler store save --store amd64 --platform linux/amd64 --filename harvester-carbide-v${vHarvester}-amd64.tar.zst
time hauler store save --store arm64 --platform linux/arm64 --filename harvester-carbide-v${vHarvester}-arm64.tar.zst
hauler store info --store amd64
hauler store info --store arm64
- name: Fetch/Build Gitea
run: |
cd hauler/gitea && source ~/.bashrc
source <(grep "export vGitea=" ../scripts/gitea/hauler-gitea.sh)
time hauler store sync --store amd64 --platform linux/amd64 --files rancher-airgap-gitea.yaml
time hauler store sync --store arm64 --platform linux/arm64 --files rancher-airgap-gitea.yaml
time hauler store save --store amd64 --platform linux/amd64 --filename gitea-carbide-v${vGitea}-amd64.tar.zst
time hauler store save --store arm64 --platform linux/arm64 --filename gitea-carbide-v${vGitea}-arm64.tar.zst
hauler store info --store amd64
hauler store info --store arm64
- name: Fetch/Build Kubevip
run: |
cd hauler/kubevip && source ~/.bashrc
source <(grep "export vKubeVip=" ../scripts/kubevip/hauler-kubevip.sh)
time hauler store sync --store amd64 --platform linux/amd64 --files rancher-airgap-kubevip.yaml
time hauler store sync --store arm64 --platform linux/arm64 --files rancher-airgap-kubevip.yaml
time hauler store save --store amd64 --platform linux/amd64 --filename kubevip-carbide-v${KubeVip}-amd64.tar.zst
time hauler store save --store arm64 --platform linux/arm64 --filename kubevip-carbide-v${KubeVip}-arm64.tar.zst
hauler store info --store amd64
hauler store info --store arm64
- name: Fetch/Build Vault
run: |
cd hauler/vault && source ~/.bashrc
source <(grep "export vVault=" ../scripts/vault/hauler-vault.sh)
time hauler store sync --store amd64 --platform linux/amd64 --files rancher-airgap-vault.yaml
time hauler store sync --store arm64 --platform linux/arm64 --files rancher-airgap-vault.yaml
time hauler store save --store amd64 --platform linux/amd64 --filename vault-carbide-v${vVault}-amd64.tar.zst
time hauler store save --store arm64 --platform linux/arm64 --filename vault-carbide-v${vVault}-arm64.tar.zst
hauler store info --store amd64
hauler store info --store arm64
- name: Fetch/Build Private
run: |
mkdir -p hauler/carbide && cd hauler/carbide && source ~/.bashrc
echo -e "apiVersion: content.hauler.cattle.io/v1alpha1\nkind: Images\nmetadata:\n name: carbide-images\nspec:\n images:\n$(curl -sfL https://raw.githubusercontent.com/rancherfederal/carbide-releases/main/carbide-images.txt | sed '/nats/d' | sed 's/^/ - name: /')" > carbide-images.yaml
sed -i "s/rgcrprod.azurecr.us/registry.ranchercarbide.dev/g" carbide-images.yaml
echo -e "apiVersion: content.hauler.cattle.io/v1alpha1\nkind: Images\nmetadata:\n name: carbide-dependency-images\nspec:\n images:\n$(curl -sfL https://raw.githubusercontent.com/rancherfederal/carbide-releases/main/carbide-images.txt | sed '/rgcr/d' | sed 's/^/ - name: /')" > carbide-dependency-images.yaml
echo -e "apiVersion: content.hauler.cattle.io/v1alpha1\nkind: Charts\nmetadata:\n name: carbide-charts\nspec:\n charts:\n - name: rancher\n repoURL: https://rancherfederal.github.io/carbide-charts\n version: 2.9.3\n - name: airgapped-docs\n repoURL: https://rancherfederal.github.io/carbide-charts\n version: 0.1.53\n - name: stigatron\n repoURL: https://rancherfederal.github.io/carbide-charts\n version: 0.3.0\n - name: stigatron-ui\n repoURL: https://rancherfederal.github.io/carbide-charts\n version: 0.3.0\n---\napiVersion: content.hauler.cattle.io/v1alpha1\nkind: Charts\nmetadata:\n name: carbide-dependency-charts\nspec:\n charts:\n - name: heimdall2\n repoURL: https://rancherfederal.github.io/carbide-charts\n version: 0.1.41\n - name: nats\n repoURL: https://nats-io.github.io/k8s/helm/charts\n version: 1.1.5" > carbide-charts.yaml
echo -e "apiVersion: content.hauler.cattle.io/v1alpha1\nkind: Images\nmetadata:\n name: carbide-provisioning-images\n annotations:\n hauler.dev/key: /tmp/carbide-key.pub\n # hauler.dev/platform: linux/amd64 # only fetch specific platform/architecture\nspec:\n images:\n - name: rgcrprod.azurecr.us/rancher/machine:v0.15.0-rancher118-carbide-1\n - name: rgcrprod.azurecr.us/rancher/rancher:v2.9.3-carbide-1\n - name: rgcrprod.azurecr.us/rancher/rancher-agent:v2.9.3-carbide-1\n - name: rgcrprod.azurecr.us/carbide/carbide-docs:0.1.7-carbide-1\n---\napiVersion: content.hauler.cattle.io/v1alpha1\nkind: Charts\nmetadata:\n name: carbide-provisioning-charts\nspec:\n charts:\n - name: rancher\n repoURL: https://rancherfederal.github.io/carbide-charts\n version: 2.9.3" > carbide-provisioning.yaml
sed -i "s/rgcrprod.azurecr.us/registry.ranchercarbide.dev/g" carbide-provisioning.yaml
time hauler store sync --store amd64 --key ../../carbide-key.pub --platform linux/amd64 --files carbide-images.yaml
time hauler store sync --store arm64 --key ../../carbide-key.pub --platform linux/arm64 --files carbide-images.yaml
time hauler store sync --store amd64 --platform linux/amd64 --files carbide-dependency-images.yaml
time hauler store sync --store arm64 --platform linux/arm64 --files carbide-dependency-images.yaml
time hauler store sync --store amd64 --platform linux/amd64 --files carbide-charts.yaml
time hauler store sync --store arm64 --platform linux/arm64 --files carbide-charts.yaml
time hauler store sync --store amd64 --platform linux/amd64 --files carbide-provisioning.yaml
time hauler store sync --store arm64 --platform linux/arm64 --files carbide-provisioning.yaml
time hauler store save --store amd64 --platform linux/amd64 --filename carbide-carbide-$(date +"%m%d%Y")-amd64.tar.zst
time hauler store save --store arm64 --platform linux/arm64 --filename carbide-carbide-$(date +"%m%d%Y")-arm64.tar.zst
hauler store info --store amd64
hauler store info --store arm64
- name: Fetch/Build/Upload Hauler Binaries
run: |
mkdir -p hauler/hauler/binaries && cd hauler/hauler/binaries && source ~/.bashrc
source <(grep "export vHauler=" ../../scripts/hauler/hauler-hauler.sh)
curl -sfOL https://github.com/hauler-dev/hauler/releases/download/v${vHauler}/hauler_${vHauler}_checksums.txt
curl -sfOL https://github.com/hauler-dev/hauler/releases/download/v${vHauler}/hauler_${vHauler}_darwin_all.tar.gz
curl -sfOL https://github.com/hauler-dev/hauler/releases/download/v${vHauler}/hauler_${vHauler}_darwin_amd64.tar.gz
curl -sfOL https://github.com/hauler-dev/hauler/releases/download/v${vHauler}/hauler_${vHauler}_darwin_arm64.tar.gz
curl -sfOL https://github.com/hauler-dev/hauler/releases/download/v${vHauler}/hauler_${vHauler}_linux_amd64.tar.gz
curl -sfOL https://github.com/hauler-dev/hauler/releases/download/v${vHauler}/hauler_${vHauler}_linux_arm64.tar.gz
curl -sfOL https://github.com/hauler-dev/hauler/releases/download/v${vHauler}/hauler_${vHauler}_windows_amd64.tar.gz
curl -sfOL https://github.com/hauler-dev/hauler/releases/download/v${vHauler}/hauler_${vHauler}_windows_arm64.tar.gz
for file in *.tar.gz; do
folder_name="${file%.tar.gz}"
mkdir -p "$folder_name"
tar -xzf "$file" -C "$folder_name"
rm -f "$file"
done
time tar --zstd -cvf hauler-binaries-v${vHauler}.tar.zst ./*_checksums.txt */
time aws s3 cp --no-progress hauler-binaries-v${vHauler}.tar.zst s3://carbide/${{ github.ref_name }}/
time 7z a -v999m hauler-binaries-v${vHauler}.tar hauler-binaries-v${vHauler}.tar.zst
time for file in hauler-binaries-v${vHauler}.tar.0*; do
aws s3 cp --no-progress "$file" s3://carbide/${{ github.ref_name }}/spilts/
done
- name: Upload Hauler
run: |
cd hauler/hauler && source ~/.bashrc
source <(grep "export vHauler=" ../scripts/hauler/hauler-hauler.sh)
time aws s3 cp --no-progress hauler-carbide-v${vHauler}-amd64.tar.zst s3://carbide/${{ github.ref_name }}/
time aws s3 cp --no-progress hauler-carbide-v${vHauler}-arm64.tar.zst s3://carbide/${{ github.ref_name }}/
- name: Upload Helm
run: |
cd hauler/helm && source ~/.bashrc
source <(grep "export vHelm=" ../scripts/helm/hauler-helm.sh)
time aws s3 cp --no-progress helm-carbide-v${vHelm}-amd64.tar.zst s3://carbide/${{ github.ref_name }}/
time aws s3 cp --no-progress helm-carbide-v${vHelm}-arm64.tar.zst s3://carbide/${{ github.ref_name }}/
- name: Upload Cosign
run: |
cd hauler/cosign && source ~/.bashrc
source <(grep "export vCosign=" ../scripts/cosign/hauler-cosign.sh)
time aws s3 cp --no-progress cosign-carbide-v${vCosign}-amd64.tar.zst s3://carbide/${{ github.ref_name }}/
time aws s3 cp --no-progress cosign-carbide-v${vCosign}-arm64.tar.zst s3://carbide/${{ github.ref_name }}/
- name: Upload RKE2
run: |
cd hauler/rke2 && source ~/.bashrc
source <(grep "export vRKE2=" ../scripts/rke2/hauler-rke2.sh)
time aws s3 cp --no-progress rke2-carbide-v${vRKE2}-amd64.tar.zst s3://carbide/${{ github.ref_name }}/
time aws s3 cp --no-progress rke2-carbide-v${vRKE2}-arm64.tar.zst s3://carbide/${{ github.ref_name }}/
time 7z a -v999m rke2-carbide-v${vRKE2}-amd64.tar rke2-carbide-v${vRKE2}-amd64.tar.zst
time for file in rke2-carbide-v${vRKE2}-amd64.tar.0*; do
aws s3 cp --no-progress "$file" s3://carbide/${{ github.ref_name }}/spilts/
done
time 7z a -v999m rke2-carbide-v${vRKE2}-arm64.tar rke2-carbide-v${vRKE2}-arm64.tar.zst
time for file in rke2-carbide-v${vRKE2}-arm64.tar.0*; do
aws s3 cp --no-progress "$file" s3://carbide/${{ github.ref_name }}/spilts/
done
- name: Upload Rancher
run: |
cd hauler/rancher && source ~/.bashrc
source <(grep "export vRancher=" ../scripts/rancher/hauler-rancher.sh)
time aws s3 cp --no-progress rancher-carbide-v${vRancher}-amd64.tar.zst s3://carbide/${{ github.ref_name }}/
time aws s3 cp --no-progress rancher-carbide-v${vRancher}-arm64.tar.zst s3://carbide/${{ github.ref_name }}/
time 7z a -v999m rancher-carbide-v${vRancher}-amd64.tar rancher-carbide-v${vRancher}-amd64.tar.zst
time for file in rancher-carbide-v${vRancher}-amd64.tar.0*; do
aws s3 cp --no-progress "$file" s3://carbide/${{ github.ref_name }}/spilts/
done
time 7z a -v999m rancher-carbide-v${vRancher}-arm64.tar rancher-carbide-v${vRancher}-arm64.tar.zst
time for file in rancher-carbide-v${vRancher}-arm64.tar.0*; do
aws s3 cp --no-progress "$file" s3://carbide/${{ github.ref_name }}/spilts/
done
- name: Upload Rancher Minimal
run: |
cd hauler/rancher && source ~/.bashrc
source <(grep "export vRancher=" ../scripts/rancher/hauler-rancher-minimal.sh)
time aws s3 cp --no-progress rancher-minimal-carbide-v${vRancher}-amd64.tar.zst s3://carbide/${{ github.ref_name }}/
time aws s3 cp --no-progress rancher-minimal-carbide-v${vRancher}-arm64.tar.zst s3://carbide/${{ github.ref_name }}/
time 7z a -v999m rancher-minimal-carbide-v${vRancher}-amd64.tar rancher-minimal-carbide-v${vRancher}-amd64.tar.zst
time for file in rancher-minimal-carbide-v${vRancher}-amd64.tar.0*; do
aws s3 cp --no-progress "$file" s3://carbide/${{ github.ref_name }}/spilts/
done
time 7z a -v999m rancher-minimal-carbide-v${vRancher}-arm64.tar rancher-minimal-carbide-v${vRancher}-arm64.tar.zst
time for file in rancher-minimal-carbide-v${vRancher}-arm64.tar.0*; do
aws s3 cp --no-progress "$file" s3://carbide/${{ github.ref_name }}/spilts/
done
- name: Upload Longhorn
run: |
cd hauler/longhorn && source ~/.bashrc
source <(grep "export vLonghorn=" ../scripts/longhorn/hauler-longhorn.sh)
time aws s3 cp --no-progress longhorn-carbide-v${vLonghorn}-amd64.tar.zst s3://carbide/${{ github.ref_name }}/
time aws s3 cp --no-progress longhorn-carbide-v${vLonghorn}-arm64.tar.zst s3://carbide/${{ github.ref_name }}/
time 7z a -v999m longhorn-carbide-v${vLonghorn}-amd64.tar longhorn-carbide-v${vLonghorn}-amd64.tar.zst
time for file in longhorn-carbide-v${vLonghorn}-amd64.tar.0*; do
aws s3 cp --no-progress "$file" s3://carbide/${{ github.ref_name }}/spilts/
done
time 7z a -v999m longhorn-carbide-v${vLonghorn}-arm64.tar longhorn-carbide-v${vLonghorn}-arm64.tar.zst
time for file in longhorn-carbide-v${vLonghorn}-arm64.tar.0*; do
aws s3 cp --no-progress "$file" s3://carbide/${{ github.ref_name }}/spilts/
done
- name: Upload NeuVector
run: |
cd hauler/neuvector && source ~/.bashrc
source <(grep "export vNeuVector=" ../scripts/neuvector/hauler-neuvector.sh)
time aws s3 cp --no-progress neuvector-carbide-v${vNeuVector}-amd64.tar.zst s3://carbide/${{ github.ref_name }}/
time aws s3 cp --no-progress neuvector-carbide-v${vNeuVector}-arm64.tar.zst s3://carbide/${{ github.ref_name }}/
time 7z a -v999m neuvector-carbide-v${vNeuVector}-amd64.tar neuvector-carbide-v${vNeuVector}-amd64.tar.zst
time for file in neuvector-carbide-v${vNeuVector}-amd64.tar.0*; do
aws s3 cp --no-progress "$file" s3://carbide/${{ github.ref_name }}/spilts/
done
time 7z a -v999m neuvector-carbide-v${vNeuVector}-arm64.tar neuvector-carbide-v${vNeuVector}-arm64.tar.zst
time for file in neuvector-carbide-v${vNeuVector}-arm64.tar.0*; do
aws s3 cp --no-progress "$file" s3://carbide/${{ github.ref_name }}/spilts/
done
- name: Upload Harvester
run: |
cd hauler/harvester && source ~/.bashrc
source <(grep "export vHarvester=" ../scripts/harvester/hauler-harvester.sh)
time aws s3 cp --no-progress harvester-carbide-v${vHarvester}-amd64.tar.zst s3://carbide/${{ github.ref_name }}/
time aws s3 cp --no-progress harvester-carbide-v${vHarvester}-arm64.tar.zst s3://carbide/${{ github.ref_name }}/
time 7z a -v999m harvester-carbide-v${vHarvester}-amd64.tar harvester-carbide-v${vHarvester}-amd64.tar.zst
time for file in harvester-carbide-v${vHarvester}-amd64.tar.0*; do
aws s3 cp --no-progress "$file" s3://carbide/${{ github.ref_name }}/spilts/
done
time 7z a -v999m harvester-carbide-v${vHarvester}-arm64.tar harvester-carbide-v${vHarvester}-arm64.tar.zst
time for file in harvester-carbide-v${vHarvester}-arm64.tar.0*; do
aws s3 cp --no-progress "$file" s3://carbide/${{ github.ref_name }}/spilts/
done
- name: Upload Gitea
run: |
cd hauler/gitea && source ~/.bashrc
source <(grep "export vGitea=" ../scripts/gitea/hauler-gitea.sh)
time aws s3 cp --no-progress gitea-carbide-v${vGitea}-amd64.tar.zst s3://carbide/${{ github.ref_name }}/
time aws s3 cp --no-progress gitea-carbide-v${vGitea}-arm64.tar.zst s3://carbide/${{ github.ref_name }}/
- name: Upload Kubevip
run: |
cd hauler/kubevip && source ~/.bashrc
source <(grep "export vKubeVip=" ../scripts/kubevip/hauler-kubevip.sh)
time aws s3 cp --no-progress kubevip-carbide-$(date +"%m%d%Y")-amd64.tar.zst s3://carbide/${{ github.ref_name }}/
time aws s3 cp --no-progress kubevip-carbide-$(date +"%m%d%Y")-arm64.tar.zst s3://carbide/${{ github.ref_name }}/
- name: Upload Vault
run: |
cd hauler/vault && source ~/.bashrc
source <(grep "export vVault=" ../scripts/vault/hauler-vault.sh)
time aws s3 cp --no-progress vault-carbide-v${vVault}-amd64.tar.zst s3://carbide/${{ github.ref_name }}/
time aws s3 cp --no-progress vault-carbide-v${vVault}-arm64.tar.zst s3://carbide/${{ github.ref_name }}/
- name: Upload Private
run: |
cd hauler/carbide && source ~/.bashrc
time aws s3 cp --no-progress carbide-carbide-$(date +"%m%d%Y")-amd64.tar.zst s3://carbide/${{ github.ref_name }}/
time aws s3 cp --no-progress carbide-carbide-$(date +"%m%d%Y")-arm64.tar.zst s3://carbide/${{ github.ref_name }}/
time 7z a -v999m carbide-carbide-$(date +"%m%d%Y")-amd64.tar carbide-carbide-$(date +"%m%d%Y")-amd64.tar.zst
time for file in carbide-carbide-$(date +"%m%d%Y")-amd64.tar.0*; do
aws s3 cp --no-progress "$file" s3://carbide/${{ github.ref_name }}/spilts/
done
time 7z a -v999m carbide-carbide-$(date +"%m%d%Y")-arm64.tar carbide-carbide-$(date +"%m%d%Y")-arm64.tar.zst
time for file in carbide-carbide-$(date +"%m%d%Y")-arm64.tar.0*; do
aws s3 cp --no-progress "$file" s3://carbide/${{ github.ref_name }}/spilts/
done