Skip to content

Commit cf25ee8

Browse files
strtgbbMyroTk
authored andcommitted
update report upload path
1 parent 259fc41 commit cf25ee8

File tree

10 files changed

+58
-10
lines changed

10 files changed

+58
-10
lines changed

.github/actions/create_workflow_report/create_workflow_report.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff 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"))

.github/workflows/backport_branches.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,12 @@ jobs:
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

.github/workflows/master.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,12 @@ jobs:
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

.github/workflows/merge_queue.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,12 @@ jobs:
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

.github/workflows/nightly_fuzzers.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,12 @@ jobs:
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

.github/workflows/nightly_jepsen.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,12 @@ jobs:
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

.github/workflows/nightly_statistics.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,12 @@ jobs:
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

.github/workflows/pull_request.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,12 @@ jobs:
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

.github/workflows/release_branches.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,12 @@ jobs:
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

ci/praktika/yaml_additional_templates.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)