From ca1342cb59013c9ef75326b068a2d1363257737d Mon Sep 17 00:00:00 2001 From: Giles Hutton Date: Mon, 17 Aug 2026 09:37:49 +0100 Subject: [PATCH 1/3] ci: report integration test failures to Jira Add a step to the per-VM-type integration test workflow that runs the shared stackrox/actions junit2jira action against the JUnit reports produced by the tests. It creates Jira issues for failures on push (dry-run on PRs) and uploads test metrics to the shared CI store. The action reuses the gcloud session already authenticated earlier in the job, so no gcp-account input is needed. Temporarily pinned to the giles/junit2jira branch of stackrox/actions for testing; will switch to a ratcheted @main SHA once that PR merges. --- .github/workflows/integration-tests-vm-type.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/integration-tests-vm-type.yml b/.github/workflows/integration-tests-vm-type.yml index 8f7a033685..d3e2f1a55d 100644 --- a/.github/workflows/integration-tests-vm-type.yml +++ b/.github/workflows/integration-tests-vm-type.yml @@ -140,6 +140,23 @@ jobs: rm -f "$file" done + - name: Report test failures to Jira + # Run even when tests failed (that is the point), but not when the job + # was cancelled or when running benchmarks (which produce no JUnit XML). + if: (!cancelled()) && !inputs.run-benchmarks + id: junit2jira + # TEMPORARY: pinned to the giles/junit2jira branch for testing. Switch to + # a ratcheted @main SHA once stackrox/actions PR is merged. + uses: stackrox/actions/test/junit2jira@giles/junit2jira + with: + # Only create real Jira issues on push; dry-run on pull requests. + create-jiras: ${{ github.event_name == 'push' }} + jira-user: ${{ secrets.JIRA_USER }} + jira-token: ${{ secrets.JIRA_TOKEN }} + directory: integration-tests/container-logs + # gcloud is already authenticated earlier in this job, so the action + # reuses that session for the metrics upload (no gcp-account needed). + - name: Store artifacts if: always() # Don't fail the job on upload errors (e.g. ECONNRESET) — From 5a202af344b8c59e902e3aaa9e246bf5d499c52f Mon Sep 17 00:00:00 2001 From: Giles Hutton Date: Mon, 17 Aug 2026 11:25:13 +0100 Subject: [PATCH 2/3] ci: replace collector-oncall Slack alerts with Jira reporting via junit2jira --- .github/workflows/collector-builder.yml | 41 +++++++++++-------- .github/workflows/collector.yml | 41 +++++++++++-------- .github/workflows/gardenlinux-bumper.yml | 18 -------- .../workflows/integration-test-containers.yml | 41 +++++++++++-------- .github/workflows/integration-tests.yml | 21 ---------- .github/workflows/k8s-integration-tests.yml | 34 ++++++++------- .github/workflows/release.yml | 19 --------- ansible/k8s-integration-tests.yml | 32 ++++++++++++++- 8 files changed, 116 insertions(+), 131 deletions(-) diff --git a/.github/workflows/collector-builder.yml b/.github/workflows/collector-builder.yml index ae1aa487c8..7620e38c57 100644 --- a/.github/workflows/collector-builder.yml +++ b/.github/workflows/collector-builder.yml @@ -123,6 +123,18 @@ jobs: -e @'${{ github.workspace }}/ansible/secrets.yml' \ ansible/ci-build-builder.yml + - name: Report build failure to Jira + if: (!cancelled()) + # TEMPORARY: pinned to the giles/junit2jira branch for testing. Switch to + # a ratcheted @main SHA once stackrox/actions PR is merged. + uses: stackrox/actions/test/junit2jira@giles/junit2jira + with: + create-jiras: ${{ github.event_name == 'push' }} + jira-user: ${{ secrets.JIRA_USER }} + jira-token: ${{ secrets.JIRA_TOKEN }} + directory: junit-reports + gcp-metrics: false + create-multiarch-manifest: needs: - builder-needs-rebuilding @@ -165,21 +177,14 @@ jobs: base-image: quay.io/rhacs-eng/collector-builder:${{ env.COLLECTOR_BUILDER_TAG }} archs: ${{ env.ARCHS }} - notify: - runs-on: ubuntu-24.04 - if: always() && contains(join(needs.*.result, ','), 'failure') && github.event_name != 'pull_request' - needs: - - build-builder-image - - create-multiarch-manifest - steps: - - name: Slack notification - uses: rtCamp/action-slack-notify@v2 - env: - SLACK_WEBHOOK: ${{ secrets.SLACK_COLLECTOR_ONCALL_WEBHOOK }} - SLACK_CHANNEL: team-acs-collector-oncall - SLACK_COLOR: failure - SLACK_LINK_NAMES: true - SLACK_TITLE: "Builder image build has failed" - MSG_MINIMAL: actions url,commit - SLACK_MESSAGE: | - @acs-collector-oncall + - name: Report build failure to Jira + if: (!cancelled()) + # TEMPORARY: pinned to the giles/junit2jira branch for testing. Switch to + # a ratcheted @main SHA once stackrox/actions PR is merged. + uses: stackrox/actions/test/junit2jira@giles/junit2jira + with: + create-jiras: ${{ github.event_name == 'push' }} + jira-user: ${{ secrets.JIRA_USER }} + jira-token: ${{ secrets.JIRA_TOKEN }} + directory: junit-reports + gcp-metrics: false diff --git a/.github/workflows/collector.yml b/.github/workflows/collector.yml index a1ee87c037..ed07a838a6 100644 --- a/.github/workflows/collector.yml +++ b/.github/workflows/collector.yml @@ -88,6 +88,18 @@ jobs: -e @'${{ github.workspace }}/ansible/secrets.yml' \ ansible/ci-build-collector.yml + - name: Report build failure to Jira + if: (!cancelled()) + # TEMPORARY: pinned to the giles/junit2jira branch for testing. Switch to + # a ratcheted @main SHA once stackrox/actions PR is merged. + uses: stackrox/actions/test/junit2jira@giles/junit2jira + with: + create-jiras: ${{ github.event_name == 'push' }} + jira-user: ${{ secrets.JIRA_USER }} + jira-token: ${{ secrets.JIRA_TOKEN }} + directory: junit-reports + gcp-metrics: false + create-multiarch-manifest: needs: - build-collector-image @@ -126,21 +138,14 @@ jobs: base-image: quay.io/rhacs-eng/collector:${{ inputs.collector-tag }} archs: ${{ env.ARCHS }} - notify: - runs-on: ubuntu-24.04 - if: always() && contains(join(needs.*.result, ','), 'failure') && github.event_name != 'pull_request' - needs: - - build-collector-image - - create-multiarch-manifest - steps: - - name: Slack notification - uses: rtCamp/action-slack-notify@v2 - env: - SLACK_WEBHOOK: ${{ secrets.SLACK_COLLECTOR_ONCALL_WEBHOOK }} - SLACK_CHANNEL: team-acs-collector-oncall - SLACK_COLOR: failure - SLACK_LINK_NAMES: true - SLACK_TITLE: "Collector image build has failed" - MSG_MINIMAL: actions url,commit - SLACK_MESSAGE: | - @acs-collector-oncall + - name: Report build failure to Jira + if: (!cancelled()) + # TEMPORARY: pinned to the giles/junit2jira branch for testing. Switch to + # a ratcheted @main SHA once stackrox/actions PR is merged. + uses: stackrox/actions/test/junit2jira@giles/junit2jira + with: + create-jiras: ${{ github.event_name == 'push' }} + jira-user: ${{ secrets.JIRA_USER }} + jira-token: ${{ secrets.JIRA_TOKEN }} + directory: junit-reports + gcp-metrics: false diff --git a/.github/workflows/gardenlinux-bumper.yml b/.github/workflows/gardenlinux-bumper.yml index af51c7a9ba..af4ec29887 100644 --- a/.github/workflows/gardenlinux-bumper.yml +++ b/.github/workflows/gardenlinux-bumper.yml @@ -41,21 +41,3 @@ jobs: labels: | all-integration-tests draft: false - - notify: - runs-on: ubuntu-24.04 - if: always() && contains(join(needs.*.result, ','), 'failure') && github.event_name == 'schedule' - needs: - - run-bumper - steps: - - name: Slack notification - uses: rtCamp/action-slack-notify@v2 - env: - SLACK_WEBHOOK: ${{ secrets.SLACK_COLLECTOR_ONCALL_WEBHOOK }} - SLACK_CHANNEL: team-acs-collector-oncall - SLACK_COLOR: failure - SLACK_LINK_NAMES: true - SLACK_TITLE: Garden Linux version bumper failed - MSG_MINIMAL: actions url,commit - SLACK_MESSAGE: | - @acs-collector-oncall diff --git a/.github/workflows/integration-test-containers.yml b/.github/workflows/integration-test-containers.yml index 9d6a1590fc..6307d1a784 100644 --- a/.github/workflows/integration-test-containers.yml +++ b/.github/workflows/integration-test-containers.yml @@ -123,6 +123,18 @@ jobs: -e @'${{ github.workspace }}/ansible/secrets.yml' \ ansible/ci-build-tests.yml + - name: Report build failure to Jira + if: (!cancelled()) + # TEMPORARY: pinned to the giles/junit2jira branch for testing. Switch to + # a ratcheted @main SHA once stackrox/actions PR is merged. + uses: stackrox/actions/test/junit2jira@giles/junit2jira + with: + create-jiras: ${{ github.event_name == 'push' }} + jira-user: ${{ secrets.JIRA_USER }} + jira-token: ${{ secrets.JIRA_TOKEN }} + directory: junit-reports + gcp-metrics: false + common-variables: runs-on: ubuntu-24.04 outputs: @@ -179,21 +191,14 @@ jobs: run: | make -C "${{ matrix.directory }}" build-and-push - notify: - runs-on: ubuntu-24.04 - if: always() && contains(join(needs.*.result, ','), 'failure') && github.event_name != 'pull_request' - needs: - - build-test-image - - rebuild-containers - steps: - - name: Slack notification - uses: rtCamp/action-slack-notify@v2 - env: - SLACK_WEBHOOK: ${{ secrets.SLACK_COLLECTOR_ONCALL_WEBHOOK }} - SLACK_CHANNEL: team-acs-collector-oncall - SLACK_COLOR: failure - SLACK_LINK_NAMES: true - SLACK_TITLE: "Failed to rebuild test containers" - MSG_MINIMAL: actions url,commit - SLACK_MESSAGE: | - @acs-collector-oncall + - name: Report build failure to Jira + if: (!cancelled()) + # TEMPORARY: pinned to the giles/junit2jira branch for testing. Switch to + # a ratcheted @main SHA once stackrox/actions PR is merged. + uses: stackrox/actions/test/junit2jira@giles/junit2jira + with: + create-jiras: ${{ github.event_name == 'push' }} + jira-user: ${{ secrets.JIRA_USER }} + jira-token: ${{ secrets.JIRA_TOKEN }} + directory: junit-reports + gcp-metrics: false diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index fb51f58a22..74c7763639 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -130,24 +130,3 @@ jobs: job-tag: ${{ inputs.job-tag }} collector-repo: ${{ inputs.collector-repo }} secrets: inherit - - notify: - runs-on: ubuntu-24.04 - if: always() && contains(join(needs.*.result, ','), 'failure') && github.event_name != 'pull_request' - needs: - - amd64-integration-tests - - arm64-integration-tests - - s390x-integration-tests - - ppc64le-integration-tests - steps: - - name: Slack notification - uses: rtCamp/action-slack-notify@v2 - env: - SLACK_WEBHOOK: ${{ secrets.SLACK_COLLECTOR_ONCALL_WEBHOOK }} - SLACK_CHANNEL: team-acs-collector-oncall - SLACK_COLOR: failure - SLACK_LINK_NAMES: true - SLACK_TITLE: "Integration tests failed." - MSG_MINIMAL: actions url,commit - SLACK_MESSAGE: | - @acs-collector-oncall diff --git a/.github/workflows/k8s-integration-tests.yml b/.github/workflows/k8s-integration-tests.yml index 38c3307f5a..1d3ad69151 100644 --- a/.github/workflows/k8s-integration-tests.yml +++ b/.github/workflows/k8s-integration-tests.yml @@ -96,6 +96,22 @@ jobs: -e @/tmp/vars.yml \ ansible/k8s-integration-tests.yml + - name: Report test failures to Jira + # Run even when tests failed (that is the point), but not when the job + # was cancelled. + if: (!cancelled()) + id: junit2jira + # TEMPORARY: pinned to the giles/junit2jira branch for testing. Switch to + # a ratcheted @main SHA once stackrox/actions PR is merged. + uses: stackrox/actions/test/junit2jira@giles/junit2jira + with: + # Only create real Jira issues on push; dry-run on pull requests. + create-jiras: ${{ github.event_name == 'push' }} + jira-user: ${{ secrets.JIRA_USER }} + jira-token: ${{ secrets.JIRA_TOKEN }} + directory: integration-tests/container-logs + gcp-metrics: false + - name: Store artifacts if: always() uses: actions/upload-artifact@v4 @@ -103,21 +119,3 @@ jobs: name: k8s-logs path: | ${{ github.workspace }}/integration-tests/container-logs/**/* - - notify: - runs-on: ubuntu-24.04 - if: always() && contains(join(needs.*.result, ','), 'failure') && github.event_name != 'pull_request' - needs: - - k8s-integration-tests - steps: - - name: Slack notification - uses: rtCamp/action-slack-notify@v2 - env: - SLACK_WEBHOOK: ${{ secrets.SLACK_COLLECTOR_ONCALL_WEBHOOK }} - SLACK_CHANNEL: team-acs-collector-oncall - SLACK_COLOR: failure - SLACK_LINK_NAMES: true - SLACK_TITLE: "K8S Integration tests failed." - MSG_MINIMAL: actions url,commit - SLACK_MESSAGE: | - @acs-collector-oncall diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4907ec34e3..a5407cbbbc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -223,22 +223,3 @@ jobs: run: | cd falcosecurity-libs/ git push origin "${RELEASE}.${PATCH}" - - - name: Send message to slack - uses: rtCamp/action-slack-notify@v2 - env: - SLACK_WEBHOOK: ${{ secrets.SLACK_COLLECTOR_ONCALL_WEBHOOK }} - SLACK_CHANNEL: team-acs-collector-oncall - SLACK_COLOR: success - SLACK_LINK_NAMES: true - SLACK_TITLE: "New release tagged" - SLACKIFY_MARKDOWN: true - MSG_MINIMAL: true - SLACK_MESSAGE: | - @acs-collector-oncall a new release has just been triggered - with the following values: - - | Name | Value | - | --- | --- | - | Version | ${{ env.RELEASE }}.${{ env.PATCH }} | - | Release Type | ${{ env.RELEASE_TYPE }} | diff --git a/ansible/k8s-integration-tests.yml b/ansible/k8s-integration-tests.yml index 878e5d999e..bcf80f9d83 100644 --- a/ansible/k8s-integration-tests.yml +++ b/ansible/k8s-integration-tests.yml @@ -5,6 +5,8 @@ vars: kind_name: "{{ cluster_name | default('collector-tests') }}" c_engine: "{{ container_engine | default('docker') }}" + integration_tests_root: "{{ collector_root }}/integration-tests" + logs_root: "{{ collector_root }}/integration-tests/container-logs" tasks: - name: Check KinD is installed @@ -147,7 +149,7 @@ value: "{{ lookup('env', 'COLLECTOR_QA_TAG', default=lookup('file', collector_root + '/integration-tests/container/QA_TAG')) }}" - name: COLLECTOR_IMAGE value: "{{ collector_image }}" - args: ["-test.run", "^TestK8s.*"] + args: ["-test.run", "^TestK8s.*", "-test.v"] ports: - containerPort: 9999 volumeMounts: @@ -190,6 +192,34 @@ tags: - test-only + - name: Ensure container-logs directory exists + ansible.builtin.file: + path: "{{ logs_root }}" + state: directory + mode: "0755" + delegate_to: localhost + tags: + - test-only + + - name: Write integration test log + ansible.builtin.copy: + content: "{{ log.log }}" + dest: "{{ logs_root }}/integration-test-k8s.log" + delegate_to: localhost + tags: + - test-only + + - name: Report + community.general.make: + chdir: "{{ integration_tests_root }}" + target: report + environment: + LOG_FILE: "{{ logs_root }}/integration-test-k8s.log" + JUNIT_FILE: "integration-test-report-k8s.xml" + delegate_to: localhost + tags: + - test-only + - name: Cleanup namespace kubernetes.core.k8s: state: absent From 7a2afbabd9003c24503fb3b3c38e8a689dcb5eb6 Mon Sep 17 00:00:00 2001 From: Giles Hutton Date: Tue, 25 Aug 2026 09:44:30 +0100 Subject: [PATCH 3/3] ratchet to main and update inputs --- .github/workflows/collector-builder.yml | 12 ++++-------- .github/workflows/collector.yml | 12 ++++-------- .github/workflows/integration-test-containers.yml | 12 ++++-------- .github/workflows/integration-tests-vm-type.yml | 6 ++---- .github/workflows/k8s-integration-tests.yml | 6 ++---- 5 files changed, 16 insertions(+), 32 deletions(-) diff --git a/.github/workflows/collector-builder.yml b/.github/workflows/collector-builder.yml index 7620e38c57..785f072ef9 100644 --- a/.github/workflows/collector-builder.yml +++ b/.github/workflows/collector-builder.yml @@ -125,11 +125,9 @@ jobs: - name: Report build failure to Jira if: (!cancelled()) - # TEMPORARY: pinned to the giles/junit2jira branch for testing. Switch to - # a ratcheted @main SHA once stackrox/actions PR is merged. - uses: stackrox/actions/test/junit2jira@giles/junit2jira + uses: stackrox/actions/test/junit2jira@main with: - create-jiras: ${{ github.event_name == 'push' }} + dry-run: ${{ github.event_name != 'push' }} jira-user: ${{ secrets.JIRA_USER }} jira-token: ${{ secrets.JIRA_TOKEN }} directory: junit-reports @@ -179,11 +177,9 @@ jobs: - name: Report build failure to Jira if: (!cancelled()) - # TEMPORARY: pinned to the giles/junit2jira branch for testing. Switch to - # a ratcheted @main SHA once stackrox/actions PR is merged. - uses: stackrox/actions/test/junit2jira@giles/junit2jira + uses: stackrox/actions/test/junit2jira@main with: - create-jiras: ${{ github.event_name == 'push' }} + dry-run: ${{ github.event_name != 'push' }} jira-user: ${{ secrets.JIRA_USER }} jira-token: ${{ secrets.JIRA_TOKEN }} directory: junit-reports diff --git a/.github/workflows/collector.yml b/.github/workflows/collector.yml index ed07a838a6..562c9e1499 100644 --- a/.github/workflows/collector.yml +++ b/.github/workflows/collector.yml @@ -90,11 +90,9 @@ jobs: - name: Report build failure to Jira if: (!cancelled()) - # TEMPORARY: pinned to the giles/junit2jira branch for testing. Switch to - # a ratcheted @main SHA once stackrox/actions PR is merged. - uses: stackrox/actions/test/junit2jira@giles/junit2jira + uses: stackrox/actions/test/junit2jira@main with: - create-jiras: ${{ github.event_name == 'push' }} + dry-run: ${{ github.event_name != 'push' }} jira-user: ${{ secrets.JIRA_USER }} jira-token: ${{ secrets.JIRA_TOKEN }} directory: junit-reports @@ -140,11 +138,9 @@ jobs: - name: Report build failure to Jira if: (!cancelled()) - # TEMPORARY: pinned to the giles/junit2jira branch for testing. Switch to - # a ratcheted @main SHA once stackrox/actions PR is merged. - uses: stackrox/actions/test/junit2jira@giles/junit2jira + uses: stackrox/actions/test/junit2jira@main with: - create-jiras: ${{ github.event_name == 'push' }} + dry-run: ${{ github.event_name != 'push' }} jira-user: ${{ secrets.JIRA_USER }} jira-token: ${{ secrets.JIRA_TOKEN }} directory: junit-reports diff --git a/.github/workflows/integration-test-containers.yml b/.github/workflows/integration-test-containers.yml index 6307d1a784..29b03405fd 100644 --- a/.github/workflows/integration-test-containers.yml +++ b/.github/workflows/integration-test-containers.yml @@ -125,11 +125,9 @@ jobs: - name: Report build failure to Jira if: (!cancelled()) - # TEMPORARY: pinned to the giles/junit2jira branch for testing. Switch to - # a ratcheted @main SHA once stackrox/actions PR is merged. - uses: stackrox/actions/test/junit2jira@giles/junit2jira + uses: stackrox/actions/test/junit2jira@main with: - create-jiras: ${{ github.event_name == 'push' }} + dry-run: ${{ github.event_name != 'push' }} jira-user: ${{ secrets.JIRA_USER }} jira-token: ${{ secrets.JIRA_TOKEN }} directory: junit-reports @@ -193,11 +191,9 @@ jobs: - name: Report build failure to Jira if: (!cancelled()) - # TEMPORARY: pinned to the giles/junit2jira branch for testing. Switch to - # a ratcheted @main SHA once stackrox/actions PR is merged. - uses: stackrox/actions/test/junit2jira@giles/junit2jira + uses: stackrox/actions/test/junit2jira@main with: - create-jiras: ${{ github.event_name == 'push' }} + dry-run: ${{ github.event_name != 'push' }} jira-user: ${{ secrets.JIRA_USER }} jira-token: ${{ secrets.JIRA_TOKEN }} directory: junit-reports diff --git a/.github/workflows/integration-tests-vm-type.yml b/.github/workflows/integration-tests-vm-type.yml index d3e2f1a55d..7238b476eb 100644 --- a/.github/workflows/integration-tests-vm-type.yml +++ b/.github/workflows/integration-tests-vm-type.yml @@ -145,12 +145,10 @@ jobs: # was cancelled or when running benchmarks (which produce no JUnit XML). if: (!cancelled()) && !inputs.run-benchmarks id: junit2jira - # TEMPORARY: pinned to the giles/junit2jira branch for testing. Switch to - # a ratcheted @main SHA once stackrox/actions PR is merged. - uses: stackrox/actions/test/junit2jira@giles/junit2jira + uses: stackrox/actions/test/junit2jira@main with: # Only create real Jira issues on push; dry-run on pull requests. - create-jiras: ${{ github.event_name == 'push' }} + dry-run: ${{ github.event_name != 'push' }} jira-user: ${{ secrets.JIRA_USER }} jira-token: ${{ secrets.JIRA_TOKEN }} directory: integration-tests/container-logs diff --git a/.github/workflows/k8s-integration-tests.yml b/.github/workflows/k8s-integration-tests.yml index 1d3ad69151..d517ad76ef 100644 --- a/.github/workflows/k8s-integration-tests.yml +++ b/.github/workflows/k8s-integration-tests.yml @@ -101,12 +101,10 @@ jobs: # was cancelled. if: (!cancelled()) id: junit2jira - # TEMPORARY: pinned to the giles/junit2jira branch for testing. Switch to - # a ratcheted @main SHA once stackrox/actions PR is merged. - uses: stackrox/actions/test/junit2jira@giles/junit2jira + uses: stackrox/actions/test/junit2jira@main with: # Only create real Jira issues on push; dry-run on pull requests. - create-jiras: ${{ github.event_name == 'push' }} + dry-run: ${{ github.event_name != 'push' }} jira-user: ${{ secrets.JIRA_USER }} jira-token: ${{ secrets.JIRA_TOKEN }} directory: integration-tests/container-logs