Skip to content
This repository was archived by the owner on Jan 13, 2026. It is now read-only.

Commit d494f03

Browse files
author
Jesús Miguel Benito Calzada
authored
Add status check jobs for local_e2e_tests matrix and linters (#5628)
Due to GH limitations, it is not possible to add a branch protection rule pointing to all the jobs generated by GHA's matrix strategy. As a workaround, we've introduced a new status check job that depends on the job with the matrix, and whose status depends on the success of all the jobs generated by that. In addition, we've taken advantage to add another check-status job for all the linter jobs. Signed-off-by: Jesús Miguel Benito Calzada <bjesus@vmware.com>
1 parent 991d3e9 commit d494f03

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

.github/workflows/kubeapps-general.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,15 @@ jobs:
179179
with:
180180
golang_version: ${{ needs.setup.outputs.golang_version }}
181181

182+
linters_result:
183+
if: inputs.run_linters && always()
184+
needs: linters
185+
runs-on: ubuntu-latest
186+
steps:
187+
- name: "Check all linters result"
188+
if: needs.linters.result != 'success'
189+
run: exit 1
190+
182191
test_go:
183192
needs:
184193
- setup
@@ -533,6 +542,20 @@ jobs:
533542
name: e2e_tests_${{ matrix.tests_group }}_reports
534543
path: integration/reports
535544

545+
# We need this job to aggregate the result of the local_e2e_tests matrix and summarize it. We don't need it because of
546+
# GHA itself, but because in GH branch protection rules, we cannot check the status for a job matrix, and would have
547+
# require the status for each job in the matrix (eg. local_e2e_tests(carvel)).
548+
# See https://github.com/orgs/community/discussions/26822
549+
local_e2e_tests_result:
550+
needs:
551+
- local_e2e_tests
552+
runs-on: ubuntu-latest
553+
if: always()
554+
steps:
555+
- name: "Check local_e2e_tests matrix status"
556+
if: needs.local_e2e_tests.result != 'success'
557+
run: exit 1
558+
536559
push_images:
537560
if: needs.setup.outputs.running_on_main == 'true' || needs.setup.outputs.running_on_tag == 'true'
538561
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)