mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-18 13:42:02 +00:00
70 lines
2.8 KiB
YAML
70 lines
2.8 KiB
YAML
name: PublishedReleaseCI
|
|
# - 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'
|
|
JFROG_API_KEY=${{ secrets.JFROG_ARTIFACTORY_API_KEY }}
|
|
TEMP_PATH=${{runner.temp}}/release_packages
|
|
REPO_COPY=${{runner.temp}}/release_packages/ClickHouse
|
|
EOF
|
|
- name: Check out repository code
|
|
uses: ClickHouse/checkout@v1
|
|
with:
|
|
# Always use the most recent script version
|
|
ref: master
|
|
- name: Download packages and push to Artifactory
|
|
run: |
|
|
rm -rf "$TEMP_PATH" && mkdir -p "$TEMP_PATH"
|
|
cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH"
|
|
cd "$REPO_COPY"
|
|
# Download and push packages to artifactory
|
|
python3 ./tests/ci/push_to_artifactory.py --release '${{ github.ref }}' \
|
|
--commit '${{ github.sha }}' --artifactory-url '${{ secrets.JFROG_ARTIFACTORY_URL }}' --all
|
|
# Download macos binaries to ${{runner.temp}}/download_binary
|
|
python3 ./tests/ci/download_binary.py --version '${{ github.ref }}' \
|
|
--commit '${{ github.sha }}' binary_darwin binary_darwin_aarch64
|
|
mv '${{runner.temp}}/download_binary/'clickhouse-* '${{runner.temp}}/push_to_artifactory'
|
|
- name: Upload packages to release assets
|
|
uses: svenstaro/upload-release-action@v2
|
|
with:
|
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
file: ${{runner.temp}}/push_to_artifactory/*
|
|
overwrite: true
|
|
tag: ${{ github.ref }}
|
|
file_glob: true
|
|
############################################################################################
|
|
##################################### Docker images #######################################
|
|
############################################################################################
|
|
DockerServerImages:
|
|
runs-on: [self-hosted, style-checker]
|
|
steps:
|
|
- name: Check out repository code
|
|
uses: ClickHouse/checkout@v1
|
|
with:
|
|
clear-repository: true
|
|
fetch-depth: 0 # otherwise we will have no version info
|
|
- name: Check docker clickhouse/clickhouse-server building
|
|
run: |
|
|
cd "$GITHUB_WORKSPACE/tests/ci"
|
|
python3 docker_server.py --release-type auto --version "${{ github.ref }}"
|
|
python3 docker_server.py --release-type auto --version "${{ github.ref }}" --no-ubuntu \
|
|
--image-repo clickhouse/clickhouse-keeper --image-path docker/keeper
|
|
- name: Cleanup
|
|
if: always()
|
|
run: |
|
|
docker ps --quiet | xargs --no-run-if-empty docker kill ||:
|
|
docker ps --all --quiet | xargs --no-run-if-empty docker rm -f ||:
|
|
sudo rm -fr "$TEMP_PATH"
|