File tree Expand file tree Collapse file tree 10 files changed +58
-10
lines changed
actions/create_workflow_report Expand file tree Collapse file tree 10 files changed +58
-10
lines changed Original file line number Diff line number Diff line change @@ -823,7 +823,10 @@ def create_workflow_report(
823823 print (f"Report saved to { report_path } " )
824824 exit (0 )
825825
826- report_destination_key = f"{ pr_number } /{ commit_sha } /{ report_name } "
826+ if pr_number == 0 :
827+ report_destination_key = f"REFs/{ branch_name } /{ commit_sha } /{ report_name } "
828+ else :
829+ report_destination_key = f"PRs/{ pr_number } /{ commit_sha } /{ report_name } "
827830
828831 # Upload the report to S3
829832 s3_client = boto3 .client ("s3" , endpoint_url = os .getenv ("S3_URL" ))
Original file line number Diff line number Diff line change 6363 PR_NUMBER : ${{ github.event.pull_request.number || 0 }}
6464 COMMIT_SHA : ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
6565 run : |
66- REPORT_LINK=https://s3.amazonaws.com/altinity-build-artifacts/$PR_NUMBER/$COMMIT_SHA/ci_run_report.html
66+ if [ "$PR_NUMBER" -eq 0 ]; then
67+ PREFIX="REFs/$BRANCH/$COMMIT_SHA"
68+ else
69+ PREFIX="PRs/$PR_NUMBER/$COMMIT_SHA"
70+ fi
71+ REPORT_LINK=https://s3.amazonaws.com/altinity-build-artifacts/$PREFIX/ci_run_report.html
6772 echo "Workflow Run Report: [View Report]($REPORT_LINK)" >> $GITHUB_STEP_SUMMARY
6873
6974 - name : Prepare env script
Original file line number Diff line number Diff line change 6262 PR_NUMBER : ${{ github.event.pull_request.number || 0 }}
6363 COMMIT_SHA : ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
6464 run : |
65- REPORT_LINK=https://s3.amazonaws.com/altinity-build-artifacts/$PR_NUMBER/$COMMIT_SHA/ci_run_report.html
65+ if [ "$PR_NUMBER" -eq 0 ]; then
66+ PREFIX="REFs/$BRANCH/$COMMIT_SHA"
67+ else
68+ PREFIX="PRs/$PR_NUMBER/$COMMIT_SHA"
69+ fi
70+ REPORT_LINK=https://s3.amazonaws.com/altinity-build-artifacts/$PREFIX/ci_run_report.html
6671 echo "Workflow Run Report: [View Report]($REPORT_LINK)" >> $GITHUB_STEP_SUMMARY
6772
6873 - name : Prepare env script
Original file line number Diff line number Diff line change 5151 PR_NUMBER : ${{ github.event.pull_request.number || 0 }}
5252 COMMIT_SHA : ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
5353 run : |
54- REPORT_LINK=https://s3.amazonaws.com/altinity-build-artifacts/$PR_NUMBER/$COMMIT_SHA/ci_run_report.html
54+ if [ "$PR_NUMBER" -eq 0 ]; then
55+ PREFIX="REFs/$BRANCH/$COMMIT_SHA"
56+ else
57+ PREFIX="PRs/$PR_NUMBER/$COMMIT_SHA"
58+ fi
59+ REPORT_LINK=https://s3.amazonaws.com/altinity-build-artifacts/$PREFIX/ci_run_report.html
5560 echo "Workflow Run Report: [View Report]($REPORT_LINK)" >> $GITHUB_STEP_SUMMARY
5661
5762 - name : Prepare env script
Original file line number Diff line number Diff line change 3939 PR_NUMBER : ${{ github.event.pull_request.number || 0 }}
4040 COMMIT_SHA : ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
4141 run : |
42- REPORT_LINK=https://s3.amazonaws.com/altinity-build-artifacts/$PR_NUMBER/$COMMIT_SHA/ci_run_report.html
42+ if [ "$PR_NUMBER" -eq 0 ]; then
43+ PREFIX="REFs/$BRANCH/$COMMIT_SHA"
44+ else
45+ PREFIX="PRs/$PR_NUMBER/$COMMIT_SHA"
46+ fi
47+ REPORT_LINK=https://s3.amazonaws.com/altinity-build-artifacts/$PREFIX/ci_run_report.html
4348 echo "Workflow Run Report: [View Report]($REPORT_LINK)" >> $GITHUB_STEP_SUMMARY
4449
4550 - name : Prepare env script
Original file line number Diff line number Diff line change 3939 PR_NUMBER : ${{ github.event.pull_request.number || 0 }}
4040 COMMIT_SHA : ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
4141 run : |
42- REPORT_LINK=https://s3.amazonaws.com/altinity-build-artifacts/$PR_NUMBER/$COMMIT_SHA/ci_run_report.html
42+ if [ "$PR_NUMBER" -eq 0 ]; then
43+ PREFIX="REFs/$BRANCH/$COMMIT_SHA"
44+ else
45+ PREFIX="PRs/$PR_NUMBER/$COMMIT_SHA"
46+ fi
47+ REPORT_LINK=https://s3.amazonaws.com/altinity-build-artifacts/$PREFIX/ci_run_report.html
4348 echo "Workflow Run Report: [View Report]($REPORT_LINK)" >> $GITHUB_STEP_SUMMARY
4449
4550 - name : Prepare env script
Original file line number Diff line number Diff line change 3939 PR_NUMBER : ${{ github.event.pull_request.number || 0 }}
4040 COMMIT_SHA : ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
4141 run : |
42- REPORT_LINK=https://s3.amazonaws.com/altinity-build-artifacts/$PR_NUMBER/$COMMIT_SHA/ci_run_report.html
42+ if [ "$PR_NUMBER" -eq 0 ]; then
43+ PREFIX="REFs/$BRANCH/$COMMIT_SHA"
44+ else
45+ PREFIX="PRs/$PR_NUMBER/$COMMIT_SHA"
46+ fi
47+ REPORT_LINK=https://s3.amazonaws.com/altinity-build-artifacts/$PREFIX/ci_run_report.html
4348 echo "Workflow Run Report: [View Report]($REPORT_LINK)" >> $GITHUB_STEP_SUMMARY
4449
4550 - name : Prepare env script
Original file line number Diff line number Diff line change 6363 PR_NUMBER : ${{ github.event.pull_request.number || 0 }}
6464 COMMIT_SHA : ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
6565 run : |
66- REPORT_LINK=https://s3.amazonaws.com/altinity-build-artifacts/$PR_NUMBER/$COMMIT_SHA/ci_run_report.html
66+ if [ "$PR_NUMBER" -eq 0 ]; then
67+ PREFIX="REFs/$BRANCH/$COMMIT_SHA"
68+ else
69+ PREFIX="PRs/$PR_NUMBER/$COMMIT_SHA"
70+ fi
71+ REPORT_LINK=https://s3.amazonaws.com/altinity-build-artifacts/$PREFIX/ci_run_report.html
6772 echo "Workflow Run Report: [View Report]($REPORT_LINK)" >> $GITHUB_STEP_SUMMARY
6873
6974 - name : Prepare env script
Original file line number Diff line number Diff line change 6262 PR_NUMBER : ${{ github.event.pull_request.number || 0 }}
6363 COMMIT_SHA : ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
6464 run : |
65- REPORT_LINK=https://s3.amazonaws.com/altinity-build-artifacts/$PR_NUMBER/$COMMIT_SHA/ci_run_report.html
65+ if [ "$PR_NUMBER" -eq 0 ]; then
66+ PREFIX="REFs/$BRANCH/$COMMIT_SHA"
67+ else
68+ PREFIX="PRs/$PR_NUMBER/$COMMIT_SHA"
69+ fi
70+ REPORT_LINK=https://s3.amazonaws.com/altinity-build-artifacts/$PREFIX/ci_run_report.html
6671 echo "Workflow Run Report: [View Report]($REPORT_LINK)" >> $GITHUB_STEP_SUMMARY
6772
6873 - name : Prepare env script
Original file line number Diff line number Diff line change @@ -26,7 +26,12 @@ class AltinityWorkflowTemplates:
2626 PR_NUMBER: ${{ github.event.pull_request.number || 0 }}
2727 COMMIT_SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
2828 run: |
29- REPORT_LINK=https://s3.amazonaws.com/altinity-build-artifacts/$PR_NUMBER/$COMMIT_SHA/ci_run_report.html
29+ if [ "$PR_NUMBER" -eq 0 ]; then
30+ PREFIX="REFs/$BRANCH/$COMMIT_SHA"
31+ else
32+ PREFIX="PRs/$PR_NUMBER/$COMMIT_SHA"
33+ fi
34+ REPORT_LINK=https://s3.amazonaws.com/altinity-build-artifacts/$PREFIX/ci_run_report.html
3035 echo "Workflow Run Report: [View Report]($REPORT_LINK)" >> $GITHUB_STEP_SUMMARY
3136"""
3237 # Additional jobs
You can’t perform that action at this time.
0 commit comments