-
Notifications
You must be signed in to change notification settings - Fork 171
119 lines (102 loc) · 3.42 KB
/
test-bigbang.yml
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
name: Test Big Bang extension
on:
pull_request:
paths-ignore:
- "**.md"
- "**.jpg"
- "**.png"
- "**.gif"
- "**.svg"
- "adr/**"
- "docs/**"
- "CODEOWNERS"
merge_group:
paths-ignore:
- "**.md"
- "**.jpg"
- "**.png"
- "**.gif"
- "**.svg"
- "adr/**"
- "docs/**"
- "CODEOWNERS"
permissions:
contents: read
# Abort prior jobs in the same workflow / PR
concurrency:
group: e2e-bb-${{ github.ref }}
cancel-in-progress: true
jobs:
build-bigbang:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Setup golang
uses: ./.github/actions/golang
- name: Build Zarf binary
uses: ./.github/actions/packages
with:
init-package: "false"
build-examples: "false"
- name: Login to Iron Bank
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
if: ${{ env.IRON_BANK_ROBOT_USERNAME != '' }}
env:
IRON_BANK_ROBOT_USERNAME: ${{ secrets.IRON_BANK_ROBOT_USERNAME }}
with:
registry: registry1.dso.mil
username: ${{ secrets.IRON_BANK_ROBOT_USERNAME }}
password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }}
- name: Build a registry1.dso.mil Zarf 'init' package
if: ${{ env.IRON_BANK_ROBOT_USERNAME != '' }}
env:
IRON_BANK_ROBOT_USERNAME: ${{ secrets.IRON_BANK_ROBOT_USERNAME }}
run: make ib-init-package
# Upload the contents of the build directory for later stages to use
- name: Upload build artifacts
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
with:
name: build-artifacts
path: build/
retention-days: 1
validate-bigbang:
runs-on: ubuntu-latest
needs: build-bigbang
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Download build artifacts
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: build-artifacts
path: build/
- name: Setup golang
uses: ./.github/actions/golang
- name: Make Zarf executable
run: |
chmod +x build/zarf
# Before we run the tests we need to aggressively cleanup files to reduce disk pressure
- name: Cleanup files
uses: ./.github/actions/cleanup-files
- name: Setup K3d
uses: ./.github/actions/k3d
- name: Login to Iron Bank
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
if: ${{ env.IRON_BANK_ROBOT_USERNAME != '' }}
env:
IRON_BANK_ROBOT_USERNAME: ${{ secrets.IRON_BANK_ROBOT_USERNAME }}
with:
registry: registry1.dso.mil
username: ${{ secrets.IRON_BANK_ROBOT_USERNAME }}
password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }}
- name: Run tests
if: ${{ env.IRON_BANK_ROBOT_USERNAME != '' }}
env:
IRON_BANK_ROBOT_USERNAME: ${{ secrets.IRON_BANK_ROBOT_USERNAME }}
run: |
sudo mkdir /mnt/zarf-tmp
sudo chown -R runner:runner /mnt/zarf-tmp
CI=true go test ./src/extensions/bigbang/test -failfast -v -timeout 30m
- name: Save logs
uses: ./.github/actions/save-logs