2022-08-31 09:50:47 +00:00
|
|
|
name: PublishedReleaseCI
|
2022-01-12 17:12:01 +00:00
|
|
|
# - Gets artifacts from S3
|
|
|
|
# - Sends it to JFROG Artifactory
|
|
|
|
# - Adds them to the release assets
|
|
|
|
|
|
|
|
on: # yamllint disable-line rule:truthy
|
|
|
|
release:
|
|
|
|
types:
|
|
|
|
- published
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
ReleasePublish:
|
|
|
|
runs-on: [self-hosted, style-checker]
|
|
|
|
steps:
|
|
|
|
- name: Set envs
|
|
|
|
run: |
|
|
|
|
cat >> "$GITHUB_ENV" << 'EOF'
|
2022-08-31 09:53:07 +00:00
|
|
|
JFROG_API_KEY=${{ secrets.JFROG_ARTIFACTORY_API_KEY }}
|
2022-01-12 17:12:01 +00:00
|
|
|
TEMP_PATH=${{runner.temp}}/release_packages
|
|
|
|
REPO_COPY=${{runner.temp}}/release_packages/ClickHouse
|
|
|
|
EOF
|
|
|
|
- name: Check out repository code
|
2022-12-23 16:54:19 +00:00
|
|
|
uses: ClickHouse/checkout@v1
|
2022-06-30 16:01:17 +00:00
|
|
|
with:
|
|
|
|
# Always use the most recent script version
|
|
|
|
ref: master
|
2022-01-12 17:12:01 +00:00
|
|
|
- name: Download packages and push to Artifactory
|
|
|
|
run: |
|
2022-02-16 13:02:42 +00:00
|
|
|
rm -rf "$TEMP_PATH" && mkdir -p "$TEMP_PATH"
|
|
|
|
cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH"
|
2022-01-12 17:12:01 +00:00
|
|
|
cd "$REPO_COPY"
|
2022-09-07 17:20:58 +00:00
|
|
|
# Download and push packages to artifactory
|
2022-09-13 13:03:07 +00:00
|
|
|
python3 ./tests/ci/push_to_artifactory.py --release '${{ github.ref }}' \
|
|
|
|
--commit '${{ github.sha }}' --artifactory-url '${{ secrets.JFROG_ARTIFACTORY_URL }}' --all
|
2022-09-07 17:20:58 +00:00
|
|
|
# Download macos binaries to ${{runner.temp}}/download_binary
|
2022-09-13 13:03:07 +00:00
|
|
|
python3 ./tests/ci/download_binary.py --version '${{ github.ref }}' \
|
|
|
|
--commit '${{ github.sha }}' binary_darwin binary_darwin_aarch64
|
2022-09-07 17:20:58 +00:00
|
|
|
mv '${{runner.temp}}/download_binary/'clickhouse-* '${{runner.temp}}/push_to_artifactory'
|
2022-01-12 17:12:01 +00:00
|
|
|
- name: Upload packages to release assets
|
|
|
|
uses: svenstaro/upload-release-action@v2
|
|
|
|
with:
|
|
|
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
2022-03-17 18:00:06 +00:00
|
|
|
file: ${{runner.temp}}/push_to_artifactory/*
|
2022-01-12 17:12:01 +00:00
|
|
|
overwrite: true
|
|
|
|
tag: ${{ github.ref }}
|
|
|
|
file_glob: true
|
2022-04-01 10:35:52 +00:00
|
|
|
############################################################################################
|
|
|
|
##################################### Docker images #######################################
|
|
|
|
############################################################################################
|
|
|
|
DockerServerImages:
|
|
|
|
runs-on: [self-hosted, style-checker]
|
|
|
|
steps:
|
|
|
|
- name: Check out repository code
|
2022-12-23 16:54:19 +00:00
|
|
|
uses: ClickHouse/checkout@v1
|
2022-04-01 10:35:52 +00:00
|
|
|
with:
|
2022-12-20 00:10:04 +00:00
|
|
|
clear-repository: true
|
2022-04-01 10:35:52 +00:00
|
|
|
fetch-depth: 0 # otherwise we will have no version info
|
|
|
|
- name: Check docker clickhouse/clickhouse-server building
|
|
|
|
run: |
|
|
|
|
cd "$GITHUB_WORKSPACE/tests/ci"
|
2022-04-07 10:23:15 +00:00
|
|
|
python3 docker_server.py --release-type auto --version "${{ github.ref }}"
|
|
|
|
python3 docker_server.py --release-type auto --version "${{ github.ref }}" --no-ubuntu \
|
2022-04-01 10:35:52 +00:00
|
|
|
--image-repo clickhouse/clickhouse-keeper --image-path docker/keeper
|
|
|
|
- name: Cleanup
|
|
|
|
if: always()
|
|
|
|
run: |
|
2022-09-17 18:24:56 +00:00
|
|
|
docker ps --quiet | xargs --no-run-if-empty docker kill ||:
|
|
|
|
docker ps --all --quiet | xargs --no-run-if-empty docker rm -f ||:
|
2022-04-01 10:35:52 +00:00
|
|
|
sudo rm -fr "$TEMP_PATH"
|