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
|
2023-03-07 12:42:18 +00:00
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
tag:
|
|
|
|
description: 'Release tag'
|
|
|
|
required: true
|
|
|
|
type: string
|
2022-01-12 17:12:01 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
ReleasePublish:
|
|
|
|
runs-on: [self-hosted, style-checker]
|
|
|
|
steps:
|
2023-03-07 12:42:18 +00:00
|
|
|
- name: Set tag from input
|
|
|
|
if: github.event_name == 'workflow_dispatch'
|
|
|
|
run: |
|
|
|
|
echo "GITHUB_TAG=${{ github.event.inputs.tag }}" >> "$GITHUB_ENV"
|
|
|
|
- name: Set tag from REF
|
|
|
|
if: github.event_name == 'release'
|
|
|
|
run: |
|
|
|
|
echo "GITHUB_TAG=${GITHUB_REF#refs/tags/}" >> "$GITHUB_ENV"
|
2023-01-18 18:52:11 +00:00
|
|
|
- name: Deploy packages and assets
|
2022-01-12 17:12:01 +00:00
|
|
|
run: |
|
2023-03-06 16:46:46 +00:00
|
|
|
curl --silent --data '' --no-buffer \
|
2023-01-31 12:21:12 +00:00
|
|
|
'${{ secrets.PACKAGES_RELEASE_URL }}/release/'"${GITHUB_TAG}"'?binary=binary_darwin&binary=binary_darwin_aarch64&sync=true'
|
2022-04-01 10:35:52 +00:00
|
|
|
############################################################################################
|
|
|
|
##################################### Docker images #######################################
|
|
|
|
############################################################################################
|
|
|
|
DockerServerImages:
|
|
|
|
runs-on: [self-hosted, style-checker]
|
|
|
|
steps:
|
2023-03-07 12:42:18 +00:00
|
|
|
- name: Set tag from input
|
|
|
|
if: github.event_name == 'workflow_dispatch'
|
|
|
|
run: |
|
|
|
|
echo "GITHUB_TAG=${{ github.event.inputs.tag }}" >> "$GITHUB_ENV"
|
|
|
|
- name: Set tag from REF
|
|
|
|
if: github.event_name == 'release'
|
|
|
|
run: |
|
|
|
|
echo "GITHUB_TAG=${GITHUB_REF#refs/tags/}" >> "$GITHUB_ENV"
|
2022-04-01 10:35:52 +00:00
|
|
|
- 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
|
2023-10-17 17:21:08 +00:00
|
|
|
filter: tree:0
|
2023-03-07 12:42:18 +00:00
|
|
|
ref: ${{ env.GITHUB_TAG }}
|
2022-04-01 10:35:52 +00:00
|
|
|
- name: Check docker clickhouse/clickhouse-server building
|
|
|
|
run: |
|
|
|
|
cd "$GITHUB_WORKSPACE/tests/ci"
|
2024-02-29 19:40:33 +00:00
|
|
|
export CHECK_NAME="Docker server image"
|
2024-03-01 17:16:35 +00:00
|
|
|
python3 docker_server.py --release-type auto --version "$GITHUB_TAG" --check-name "$CHECK_NAME" --push
|
2024-02-29 19:40:33 +00:00
|
|
|
- name: Check docker clickhouse/clickhouse-keeper building
|
|
|
|
run: |
|
|
|
|
cd "$GITHUB_WORKSPACE/tests/ci"
|
|
|
|
export CHECK_NAME="Docker keeper image"
|
2024-03-01 17:16:35 +00:00
|
|
|
python3 docker_server.py --release-type auto --version "$GITHUB_TAG" --check-name "$CHECK_NAME" --push
|
2022-04-01 10:35:52 +00:00
|
|
|
- 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"
|