From 949db7a70d9aef268c8cb92b907bdb8ede542f39 Mon Sep 17 00:00:00 2001 From: mgoerens <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 20 Sep 2024 22:58:38 +0200 Subject: [PATCH] pass check-report errors to next job using artifact --- .github/workflows/build.yml | 17 +++++++++++++++++ scripts/src/pullrequest/prepare_pr_comment.py | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 877e6848..1f482583 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -373,6 +373,14 @@ jobs: --api-url=${{ github.event.pull_request._links.self.href }} cd .. + - name: Upload chart_report errors + uses: actions/upload-artifact@v4 + if: ${{ always() && steps.check_report.outcome == 'failure' }} + with: + name: chart_report_errors + path: pr/errors + if-no-files-found: ignore + - name: Delete Namespace if: ${{ always() && steps.oc_login.conclusion == 'success' }} env: @@ -428,11 +436,20 @@ jobs: ../ve1/bin/pip3 install . cd .. + # Submission information should always be present - name: Download submission information uses: actions/download-artifact@v4 with: name: submission + # Chart report errors are only present if any error has occured during the chart_report + - name: Download chart_report errors + uses: actions/download-artifact@v4 + if: ${{ needs.chart-verifier.outputs.check_report-outcome || 'skipped' == 'failure' }} + with: + name: chart_report_errors + path: pr/ + - name: Prepare PR comment id: pr_comment if: ${{ needs.setup.outputs.run_build == 'true' }} diff --git a/scripts/src/pullrequest/prepare_pr_comment.py b/scripts/src/pullrequest/prepare_pr_comment.py index e06c0885..a99b4085 100644 --- a/scripts/src/pullrequest/prepare_pr_comment.py +++ b/scripts/src/pullrequest/prepare_pr_comment.py @@ -61,7 +61,7 @@ def prepare_failure_comment(): msg = append_to(msg, get_verifier_errors_comment()) msg = append_to(msg, errors) msg = append_to(msg, get_verifier_errors_trailer()) - gitutils.add_output("error-message", errors) + # gitutils.add_output("error-message", errors) else: gitutils.add_output("error-message", get_failure_comment()) return msg