Skip to content

Commit

Permalink
Better handle oc-install outcome (openshift-helm-charts#288)
Browse files Browse the repository at this point in the history
The oc-install step doesn't continue-on-error, hence we should use
.outcome instead of .conclusion to check if it runned successfully, was
skipped or failed.

This information is never empty, hence there is no need to default the
value of this argument to False in prepare_pr_comment.py.

Closes openshift-helm-charts#287

Signed-off-by: Matthias Goerens <mgoerens@redhat.com>
  • Loading branch information
mgoerens authored Oct 30, 2023
1 parent 6ea94f2 commit cc8dcba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ jobs:
PR_CONTENT_ERROR_MESSAGE: ${{ steps.check_pr_content.outputs.pr-content-error-message }}
OWNERS_ERROR_MESSAGE: ${{ steps.check_pr_content.outputs.owners-error-message }}
COMMUNITY_MANUAL_REVIEW: ${{ steps.check_report.outputs.community_manual_review_required }}
OC_INSTALL_RESULT: ${{ steps.install-oc.conclusion }}
OC_INSTALL_RESULT: ${{ steps.install-oc.outcome }}
VERIFIER_ERROR_MESSAGE: ${{ steps.check-verifier-result.outputs.verifier_error_message }}
run: |
ve1/bin/pr-comment ${{ steps.check_pr_content.outcome }} ${{ steps.run-verifier.outcome }} ${{ steps.check_report.conclusion }}
Expand Down
4 changes: 2 additions & 2 deletions scripts/src/pullrequest/prepare_pr_comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def main():
chart_name = open("./pr/chart").read().strip()

community_manual_review = os.environ.get("COMMUNITY_MANUAL_REVIEW", False)
oc_install_result = os.environ.get("OC_INSTALL_RESULT", False)
oc_install_result = os.environ.get("OC_INSTALL_RESULT")

msg = f"Thank you for submitting PR #{issue_number} for Helm Chart Certification!"

Expand All @@ -224,7 +224,7 @@ def main():
and run_verifier_result in ["success", "skipped"]
and verify_result == "success"
# installation of oc may not run if a cluster is not needed.
and oc_install_result in ["success", "skipped", False]
and oc_install_result in ["success", "skipped"]
):
outcome = "Passed"
detail_message = append_to(detail_message, get_success_coment())
Expand Down

0 comments on commit cc8dcba

Please sign in to comment.