You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by pk...@apache.org on 2026/09/16 11:36:15 UTC

(logging-flume-mongodb) 01/01: Add `build-result` job to collect matrix results

This is an automated email from the ASF dual-hosted git repository.

ppkarwasz pushed a commit to branch feature/build-result-job
in repository https://gitbox.apache.org/repos/asf/logging-flume-mongodb.git

commit 6ae706384c00f70b4d92f393bb9e75169d6fbff1
Author: Piotr P. Karwasz <pk...@apache.org>
AuthorDate: Wed Sep 16 13:36:06 2026 +0200

    Add `build-result` job to collect matrix results
    
    The `build` matrix runs on all three platforms and passes reliably, so all of
    them can be required. Instead of listing each platform in the ruleset, add a
    single `build-result` job that fails unless the whole matrix succeeded, and
    require that check in `.asf.yaml`.
    
    Assisted-By: Claude Fable 5.1 <no...@anthropic.com>
---
 .asf.yaml                    |  2 +-
 .github/workflows/build.yaml | 16 ++++++++++++++++
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/.asf.yaml b/.asf.yaml
index 334ea6f..73292b0 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -74,7 +74,7 @@ github:
       required_status_checks:
         # The GitHub Actions app
         - app_slug: github-actions
-          name: "build / build (ubuntu-latest)"
+          name: "build / build-result"
         # The GitHub Advanced Security app
         - app_slug: github-advanced-security
           name: "CodeQL"
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index bbade2b..dc7f44f 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -41,6 +41,22 @@ jobs:
     with:
       java-version: 17
 
+  # Collects the results of the `build` matrix into a single check.
+  # This is the only check that needs to be listed as required in `.asf.yaml`.
+  build-result:
+    needs: build
+    # Run even if `build` failed or was canceled, so that the check is always reported.
+    if: always()
+    runs-on: ubuntu-slim
+    steps:
+      - name: Verify build result
+        env:
+          # `success` only if all the jobs of the matrix succeeded.
+          BUILD_RESULT: ${{ needs.build.result }}
+        run: |
+          echo "Build result: $BUILD_RESULT"
+          test "$BUILD_RESULT" = "success"
+
   deploy-snapshot:
     needs: build
     if: github.repository == 'apache/logging-flume-mongodb' && github.ref_name == 'main'