Skip to content

Commit 29c28d4

Browse files
committed
add source upload to PR ci
1 parent 71fd9ed commit 29c28d4

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

.github/workflows/pull_request.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4261,3 +4261,34 @@ jobs:
42614261
with:
42624262
workflow_config: ${{ needs.config_workflow.outputs.data }}
42634263
final: true
4264+
4265+
SourceUpload:
4266+
needs: [config_workflow, build_amd_release]
4267+
if: ${{ !failure() && !cancelled() }}
4268+
runs-on: [self-hosted, altinity-on-demand, altinity-style-checker-aarch64]
4269+
env:
4270+
COMMIT_SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
4271+
PR_NUMBER: ${{ github.event.pull_request.number || 0 }}
4272+
VERSION: ${{ fromJson(needs.config_workflow.outputs.data).custom_data.version.string }}
4273+
steps:
4274+
- name: Check out repository code
4275+
uses: Altinity/checkout@19599efdf36c4f3f30eb55d5bb388896faea69f6
4276+
with:
4277+
clear-repository: true
4278+
ref: ${{ fromJson(needs.config_workflow.outputs.data).git_ref }}
4279+
submodules: true
4280+
fetch-depth: 0
4281+
filter: tree:0
4282+
- name: Create source tar
4283+
run: |
4284+
mkdir -p "$TEMP_PATH/build_check/package_release"
4285+
cd .. && tar czf $TEMP_PATH/build_source.src.tar.gz ClickHouse/
4286+
- name: Upload source tar
4287+
run: |
4288+
if [ "$PR_NUMBER" -eq 0 ]; then
4289+
S3_PATH="REFs/$GITHUB_REF_NAME/$COMMIT_SHA/build_amd_release"
4290+
else
4291+
S3_PATH="PRs/$PR_NUMBER/$COMMIT_SHA/build_amd_release"
4292+
fi
4293+
4294+
aws s3 cp $TEMP_PATH/build_source.src.tar.gz s3://altinity-build-artifacts/$S3_PATH/clickhouse-$VERSION.src.tar.gz

ci/workflows/pull_request.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
# for job in JobConfigs.performance_comparison_with_master_head_jobs
107107
# ], # NOTE (strtgbb): failed previously due to GH secrets not being handled properly, try again later
108108
],
109-
additional_jobs=["GrypeScan", "Regression", "CIReport"],
109+
additional_jobs=["GrypeScan", "Regression", "CIReport", "SourceUpload"],
110110
artifacts=[
111111
*ArtifactConfigs.unittests_binaries,
112112
*ArtifactConfigs.clickhouse_binaries,

0 commit comments

Comments
 (0)