Skip to content

Commit 505fd85

Browse files
J12934Weltraumschaf
authored andcommitted
More explicitly split hook type to be able to better install the exact
go version the hook requires Signed-off-by: Jannik Hollenbach <jannik.hollenbach@iteratec.com>
1 parent cbd1d36 commit 505fd85

1 file changed

Lines changed: 25 additions & 16 deletions

File tree

‎.github/workflows/ci.yaml‎

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ jobs:
605605
# ---- Test | Hooks ----
606606

607607
test-hooks:
608-
name: Test | Hook ${{ matrix.hook }}
608+
name: Test | Hook ${{ matrix.hook.name }}
609609
needs:
610610
- sdk
611611
- operator
@@ -615,14 +615,22 @@ jobs:
615615
fail-fast: false
616616
matrix:
617617
hook:
618-
- cascading-scans
619-
- generic-webhook
620-
- persistence-azure-monitor
621-
- persistence-elastic
622-
- persistence-dependencytrack
623-
- update-field-hook
624-
- finding-post-processing
625-
- notification
618+
- name: cascading-scans
619+
sdkType: nodejs
620+
- name: generic-webhook
621+
sdkType: nodejs
622+
- name: persistence-azure-monitor
623+
sdkType: nodejs
624+
- name: persistence-elastic
625+
sdkType: nodejs
626+
- name: persistence-dependencytrack
627+
sdkType: nodejs
628+
- name: update-field-hook
629+
sdkType: nodejs
630+
- name: finding-post-processing
631+
sdkType: golang
632+
- name: notification
633+
sdkType: nodejs
626634
# - persistence-static-report (WIP)
627635
steps:
628636
- name: Checkout
@@ -633,8 +641,9 @@ jobs:
633641

634642
- name: Go Setup
635643
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
644+
if: ${{ matrix.hook.sdkType == "golang" }}
636645
with:
637-
go-version-file: "hooks/finding-post-processing/hook/go.mod"
646+
go-version-file: "hooks/${{ matrix.hook.name }}/hook/go.mod"
638647

639648
- name: Install Task
640649
uses: go-task/setup-task@a00fbb05ce67b35648be3c78cbc9fd85354c757e # v2.2.0
@@ -672,7 +681,7 @@ jobs:
672681
helm version
673682
674683
- name: Unit Tests
675-
working-directory: ./hooks/${{ matrix.hook }}/
684+
working-directory: ./hooks/${{ matrix.hook.name }}/
676685
run: task test:unit
677686

678687
- name: Download Parser SDK Image
@@ -712,20 +721,20 @@ jobs:
712721
run: |
713722
task prepare-testing-env
714723
715-
- name: ${{ matrix.hook }} Build Scanner / Parser Images
716-
working-directory: ./hooks/${{ matrix.hook }}/
724+
- name: ${{ matrix.hook.name }} Build Scanner / Parser Images
725+
working-directory: ./hooks/${{ matrix.hook.name }}/
717726
run: task build
718727

719-
- name: ${{ matrix.hook }} Load and Deploy Scanner / Parser Images to kind Cluster
720-
working-directory: ./hooks/${{ matrix.hook }}/
728+
- name: ${{ matrix.hook.name }} Load and Deploy Scanner / Parser Images to kind Cluster
729+
working-directory: ./hooks/${{ matrix.hook.name }}/
721730
run: task deploy
722731

723732
- name: Start Integration Tests
724733
uses: nick-fields/retry@ad984534de44a9489a53aefd81eb77f87c70dc60 # v4.0.0
725734
with:
726735
timeout_minutes: 15
727736
max_attempts: 3
728-
command: cd ./hooks/${{ matrix.hook }}/ && task test:integration
737+
command: cd ./hooks/${{ matrix.hook.name }}/ && task test:integration
729738

730739
# ---- Debuging Cluster on Failure ----
731740

0 commit comments

Comments
 (0)