44 workflow_dispatch :
55 inputs :
66 sha :
7- description : ' Commit sha of Kratix'
7+ description : " Commit sha of Kratix"
88 required : true
99 type : string
1010 message :
11- description : ' Commit message'
11+ description : " Commit message"
1212 type : string
1313 required : false
1414 ssh_session :
1515 type : boolean
16- description : ' Run the build with tmate debugging.'
16+ description : " Run the build with tmate debugging."
1717 required : false
1818 default : false
1919 workflow_call :
@@ -55,29 +55,97 @@ jobs:
5555 go install golang.org/x/vuln/cmd/govulncheck@latest
5656 govulncheck ./...
5757
58- quick-start-test :
58+ - name : Build Kratix image
59+ run : |
60+ cd kratix
61+ make docker-build
62+ EXPORT_IMAGE_TAR=$(make export-image)
63+ echo "EXPORT_IMAGE_TAR=${EXPORT_IMAGE_TAR}" >> "${GITHUB_ENV}"
64+
65+ - name : Upload Kratix image artifact
66+ uses : actions/upload-artifact@v4
67+ with :
68+ name : kratix-image-${{ github.run_id }}
69+ path : ${{ env.EXPORT_IMAGE_TAR }}
70+ retention-days : 1
71+
72+ build-quick-start-installer-image :
5973 runs-on : ubuntu-latest
6074 needs : [unit-tests-and-lint]
6175 steps :
6276 - name : Checkout ci repository
6377 uses : actions/checkout@v4
6478 with :
6579 repository : syntasso/ci
80+
6681 - name : Setup Common Environment
6782 uses : ./.github/actions/setup-common
6883 with :
6984 repository : syntasso/kratix
7085 ref : ${{ github.event.inputs.sha }}
7186 path : kratix
7287 ssh_session : ${{ github.event.inputs.ssh_session }}
88+
89+ - name : Build quick-start installer image
90+ run : |
91+ cd kratix/hack/kratix-quick-start-installer
92+ QUICK_START_INSTALLER_TAR=$(make export-image)
93+ echo "QUICK_START_INSTALLER_TAR=${QUICK_START_INSTALLER_TAR}" >> "${GITHUB_ENV}"
94+
95+ - name : Upload quick-start installer image artifact
96+ uses : actions/upload-artifact@v4
97+ with :
98+ name : quick-start-installer-image-${{ github.run_id }}
99+ path : ${{ env.QUICK_START_INSTALLER_TAR }}
100+ retention-days : 1
101+
102+ quick-start-test :
103+ runs-on : ubuntu-latest
104+ needs : [build-kratix-image, build-quick-start-installer-image]
105+ steps :
106+ - name : Checkout ci repository
107+ uses : actions/checkout@v4
108+ with :
109+ repository : syntasso/ci
110+
111+ - name : Setup Common Environment
112+ uses : ./.github/actions/setup-common
113+ with :
114+ repository : syntasso/kratix
115+ ref : ${{ github.event.inputs.sha }}
116+ path : kratix
117+ ssh_session : ${{ github.event.inputs.ssh_session }}
118+
119+ - name : Download quick-start installer image artifact
120+ uses : actions/download-artifact@v4
121+ with :
122+ name : quick-start-installer-image-${{ github.run_id }}
123+ path : ${{ runner.temp }}/quick-start-installer-image
124+
125+ - name : Load quick-start installer image
126+ run : |
127+ image_tar=$(ls $RUNNER_TEMP/quick-start-installer-image/*.tar | head -1)
128+ docker load -i "${image_tar}"
129+
130+ - name : Download Kratix image artifact
131+ uses : actions/download-artifact@v4
132+ with :
133+ name : kratix-image-${{ github.run_id }}
134+ path : ${{ runner.temp }}/kratix-image
135+
136+ - name : Load Kratix image
137+ run : |
138+ image_tar=$(ls $RUNNER_TEMP/kratix-image/*.tar)
139+ docker load -i "${image_tar}"
140+
73141 - name : System Tests
74142 run : |
75143 cd kratix
76144 DOCKER_BUILDKIT=1 ACK_GINKGO_RC=true cd hack/kratix-quick-start-installer && make system-test
77145
78146 system-test :
79147 runs-on : ubuntu-latest
80- needs : [unit-tests-and-lint ]
148+ needs : [build-kratix-image, build-quick-start-installer-image ]
81149 strategy :
82150 fail-fast : false
83151 matrix :
@@ -98,13 +166,37 @@ jobs:
98166 uses : actions/checkout@v4
99167 with :
100168 repository : syntasso/ci
169+
101170 - name : Setup Common Environment
102171 uses : ./.github/actions/setup-common
103172 with :
104173 repository : syntasso/kratix
105174 ref : ${{ github.event.inputs.sha }}
106175 path : kratix
107176 ssh_session : ${{ github.event.inputs.ssh_session }}
177+
178+ - name : Download quick-start installer image artifact
179+ uses : actions/download-artifact@v4
180+ with :
181+ name : quick-start-installer-image-${{ github.run_id }}
182+ path : ${{ runner.temp }}/quick-start-installer-image
183+
184+ - name : Load quick-start installer image
185+ run : |
186+ image_tar=$(ls $RUNNER_TEMP/quick-start-installer-image/*.tar | head -1)
187+ docker load -i "${image_tar}"
188+
189+ - name : Download Kratix image artifact
190+ uses : actions/download-artifact@v4
191+ with :
192+ name : kratix-image-${{ github.run_id }}
193+ path : ${{ runner.temp }}/kratix-image
194+
195+ - name : Load Kratix image
196+ run : |
197+ image_tar=$(ls $RUNNER_TEMP/kratix-image/*.tar)
198+ docker load -i "${image_tar}"
199+
108200 - name : System Tests
109201 env : ${{ matrix.flags.env }}
110202 run : |
@@ -113,44 +205,71 @@ jobs:
113205
114206 core-test :
115207 runs-on : ubuntu-latest
116- needs : [unit-tests-and-lint ]
208+ needs : [build-kratix-image ]
117209 steps :
118210 - name : Checkout ci repository
119211 uses : actions/checkout@v4
120212 with :
121213 repository : syntasso/ci
214+
122215 - name : Setup Common Environment
123216 uses : ./.github/actions/setup-common
124217 with :
125218 repository : syntasso/kratix
126219 ref : ${{ github.event.inputs.sha }}
127220 path : kratix
128221 ssh_session : ${{ github.event.inputs.ssh_session }}
222+
223+ - name : Download Kratix image artifact
224+ uses : actions/download-artifact@v4
225+ with :
226+ name : kratix-image-${{ github.run_id }}
227+ path : ${{ runner.temp }}/kratix-image
228+
229+ - name : Load Kratix image
230+ run : |
231+ image_tar=$(ls $RUNNER_TEMP/kratix-image/*.tar)
232+ docker load -i "${image_tar}"
233+
129234 - name : System Tests
130235 run : |
131236 cd kratix
132237 DOCKER_BUILDKIT=1 ACK_GINKGO_RC=true make core-test
133238
134239 integration-test-git :
135240 runs-on : ubuntu-latest
136- needs : [unit-tests-and-lint ]
241+ needs : [build-kratix-image ]
137242 steps :
138243 - name : Checkout ci repository
139244 uses : actions/checkout@v4
140245 with :
141246 repository : syntasso/ci
247+
142248 - name : Setup Common Environment
143249 uses : ./.github/actions/setup-common
144250 with :
145251 repository : syntasso/kratix
146252 ref : ${{ github.event.inputs.sha }}
147253 path : kratix
148254 ssh_session : ${{ github.event.inputs.ssh_session }}
255+
256+ - name : Download Kratix image artifact
257+ uses : actions/download-artifact@v4
258+ with :
259+ name : kratix-image-${{ github.run_id }}
260+ path : ${{ runner.temp }}/kratix-image
261+
262+ - name : Load Kratix image
263+ run : |
264+ image_tar=$(ls $RUNNER_TEMP/kratix-image/*.tar)
265+ docker load -i "${image_tar}"
266+
149267 - name : Checkout out kratix helm charts
150268 uses : actions/checkout@v4
151269 with :
152270 repository : syntasso/helm-charts
153271 path : kratix/charts
272+
154273 - name : Install Helm
155274 uses : azure/setup-helm@v3
156275 - name : e2e-demo-test-helm-git
@@ -162,24 +281,38 @@ jobs:
162281
163282 integration-test-bucket :
164283 runs-on : ubuntu-latest
165- needs : [unit-tests-and-lint ]
284+ needs : [build-kratix-image ]
166285 steps :
167286 - name : Checkout ci repository
168287 uses : actions/checkout@v4
169288 with :
170289 repository : syntasso/ci
290+
171291 - name : Setup Common Environment
172292 uses : ./.github/actions/setup-common
173293 with :
174294 repository : syntasso/kratix
175295 ref : ${{ github.event.inputs.sha }}
176296 path : kratix
177297 ssh_session : ${{ github.event.inputs.ssh_session }}
298+
299+ - name : Download Kratix image artifact
300+ uses : actions/download-artifact@v4
301+ with :
302+ name : kratix-image-${{ github.run_id }}
303+ path : ${{ runner.temp }}/kratix-image
304+
305+ - name : Load Kratix image
306+ run : |
307+ image_tar=$(ls $RUNNER_TEMP/kratix-image/*.tar)
308+ docker load -i "${image_tar}"
309+
178310 - name : Checkout out kratix helm charts
179311 uses : actions/checkout@v4
180312 with :
181313 repository : syntasso/helm-charts
182314 path : kratix/charts
315+
183316 - name : Install Helm
184317 uses : azure/setup-helm@v3
185318 - name : e2e-demo-test-helm-bucket
0 commit comments