2021-12-01 10:27:46 +00:00
|
|
|
name: DocsCheck
|
2021-12-15 19:47:08 +00:00
|
|
|
|
|
|
|
env:
|
|
|
|
# Force the stdout and stderr streams to be unbuffered
|
|
|
|
PYTHONUNBUFFERED: 1
|
|
|
|
|
2022-04-29 13:31:34 +00:00
|
|
|
on: # yamllint disable-line rule:truthy
|
2021-12-01 10:27:46 +00:00
|
|
|
pull_request:
|
|
|
|
types:
|
|
|
|
- synchronize
|
|
|
|
- reopened
|
|
|
|
- opened
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
paths:
|
2023-09-22 09:02:09 +00:00
|
|
|
- '**.md'
|
2022-05-24 10:58:27 +00:00
|
|
|
- 'docker/docs/**'
|
2021-12-01 10:27:46 +00:00
|
|
|
- 'docs/**'
|
2022-12-19 15:21:14 +00:00
|
|
|
- 'utils/check-style/aspell-ignore/**'
|
2023-09-26 19:50:54 +00:00
|
|
|
- 'tests/ci/docs_check.py'
|
2023-10-17 17:27:58 +00:00
|
|
|
- '.github/workflows/docs_check.yml'
|
2021-12-01 10:27:46 +00:00
|
|
|
jobs:
|
|
|
|
CheckLabels:
|
|
|
|
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-12-20 00:03:19 +00:00
|
|
|
with:
|
|
|
|
clear-repository: true
|
2021-12-01 10:27:46 +00:00
|
|
|
- name: Labels check
|
|
|
|
run: |
|
2022-01-13 18:06:35 +00:00
|
|
|
cd "$GITHUB_WORKSPACE/tests/ci"
|
2021-12-01 10:27:46 +00:00
|
|
|
python3 run_check.py
|
2022-01-07 13:21:30 +00:00
|
|
|
DockerHubPushAarch64:
|
|
|
|
needs: CheckLabels
|
2022-01-24 14:55:18 +00:00
|
|
|
runs-on: [self-hosted, style-checker-aarch64]
|
2022-01-07 13:21:30 +00:00
|
|
|
steps:
|
|
|
|
- name: Check out repository code
|
2022-12-23 16:54:19 +00:00
|
|
|
uses: ClickHouse/checkout@v1
|
2022-12-20 00:03:19 +00:00
|
|
|
with:
|
|
|
|
clear-repository: true
|
2022-01-07 13:21:30 +00:00
|
|
|
- name: Images check
|
|
|
|
run: |
|
2022-01-13 18:06:35 +00:00
|
|
|
cd "$GITHUB_WORKSPACE/tests/ci"
|
2022-01-07 13:21:30 +00:00
|
|
|
python3 docker_images_check.py --suffix aarch64
|
|
|
|
- name: Upload images files to artifacts
|
2022-12-19 20:02:35 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2022-01-07 13:21:30 +00:00
|
|
|
with:
|
|
|
|
name: changed_images_aarch64
|
|
|
|
path: ${{ runner.temp }}/docker_images_check/changed_images_aarch64.json
|
|
|
|
DockerHubPushAmd64:
|
2021-12-01 10:27:46 +00:00
|
|
|
needs: CheckLabels
|
|
|
|
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-12-20 00:03:19 +00:00
|
|
|
with:
|
|
|
|
clear-repository: true
|
2021-12-01 10:27:46 +00:00
|
|
|
- name: Images check
|
|
|
|
run: |
|
2022-01-13 18:06:35 +00:00
|
|
|
cd "$GITHUB_WORKSPACE/tests/ci"
|
2022-01-07 13:21:30 +00:00
|
|
|
python3 docker_images_check.py --suffix amd64
|
|
|
|
- name: Upload images files to artifacts
|
2022-12-19 20:02:35 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2022-01-07 13:21:30 +00:00
|
|
|
with:
|
|
|
|
name: changed_images_amd64
|
|
|
|
path: ${{ runner.temp }}/docker_images_check/changed_images_amd64.json
|
|
|
|
DockerHubPush:
|
|
|
|
needs: [DockerHubPushAmd64, DockerHubPushAarch64]
|
|
|
|
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-12-20 00:03:19 +00:00
|
|
|
with:
|
|
|
|
clear-repository: true
|
2023-09-08 06:42:56 +00:00
|
|
|
fetch-depth: 0 # to find ancestor merge commits necessary for finding proper docker tags
|
2023-09-20 19:22:53 +00:00
|
|
|
filter: tree:0
|
2022-01-07 13:21:30 +00:00
|
|
|
- name: Download changed aarch64 images
|
2022-12-19 20:02:35 +00:00
|
|
|
uses: actions/download-artifact@v3
|
2022-01-07 13:21:30 +00:00
|
|
|
with:
|
|
|
|
name: changed_images_aarch64
|
|
|
|
path: ${{ runner.temp }}
|
|
|
|
- name: Download changed amd64 images
|
2022-12-19 20:02:35 +00:00
|
|
|
uses: actions/download-artifact@v3
|
2022-01-07 13:21:30 +00:00
|
|
|
with:
|
|
|
|
name: changed_images_amd64
|
|
|
|
path: ${{ runner.temp }}
|
|
|
|
- name: Images check
|
|
|
|
run: |
|
2022-01-13 18:06:35 +00:00
|
|
|
cd "$GITHUB_WORKSPACE/tests/ci"
|
2022-01-07 13:21:30 +00:00
|
|
|
python3 docker_manifests_merge.py --suffix amd64 --suffix aarch64
|
2021-12-01 10:27:46 +00:00
|
|
|
- name: Upload images files to artifacts
|
2022-12-19 20:02:35 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2021-12-01 10:27:46 +00:00
|
|
|
with:
|
|
|
|
name: changed_images
|
2022-01-07 13:21:30 +00:00
|
|
|
path: ${{ runner.temp }}/changed_images.json
|
2022-04-25 07:40:52 +00:00
|
|
|
StyleCheck:
|
|
|
|
needs: DockerHubPush
|
|
|
|
runs-on: [self-hosted, style-checker]
|
|
|
|
if: ${{ success() || failure() }}
|
|
|
|
steps:
|
|
|
|
- name: Set envs
|
|
|
|
run: |
|
|
|
|
cat >> "$GITHUB_ENV" << 'EOF'
|
|
|
|
TEMP_PATH=${{ runner.temp }}/style_check
|
2022-07-19 13:17:05 +00:00
|
|
|
ROBOT_CLICKHOUSE_SSH_KEY<<RCSK
|
|
|
|
${{secrets.ROBOT_CLICKHOUSE_SSH_KEY}}
|
|
|
|
RCSK
|
2022-04-25 07:40:52 +00:00
|
|
|
EOF
|
|
|
|
- name: Download changed images
|
|
|
|
# even if artifact does not exist, e.g. on `do not test` label or failed Docker job
|
|
|
|
continue-on-error: true
|
2022-12-19 20:02:35 +00:00
|
|
|
uses: actions/download-artifact@v3
|
2022-04-25 07:40:52 +00:00
|
|
|
with:
|
|
|
|
name: changed_images
|
|
|
|
path: ${{ env.TEMP_PATH }}
|
|
|
|
- name: Check out repository code
|
2022-12-23 16:54:19 +00:00
|
|
|
uses: ClickHouse/checkout@v1
|
2022-12-20 00:03:19 +00:00
|
|
|
with:
|
|
|
|
clear-repository: true
|
2022-04-25 07:40:52 +00:00
|
|
|
- name: Style Check
|
|
|
|
run: |
|
|
|
|
cd "$GITHUB_WORKSPACE/tests/ci"
|
|
|
|
python3 style_check.py
|
|
|
|
- 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-25 07:40:52 +00:00
|
|
|
sudo rm -fr "$TEMP_PATH"
|
2021-12-01 10:27:46 +00:00
|
|
|
DocsCheck:
|
|
|
|
needs: DockerHubPush
|
2022-04-19 20:36:49 +00:00
|
|
|
runs-on: [self-hosted, func-tester-aarch64]
|
2021-12-01 10:27:46 +00:00
|
|
|
steps:
|
2021-12-09 18:09:46 +00:00
|
|
|
- name: Set envs
|
|
|
|
run: |
|
|
|
|
cat >> "$GITHUB_ENV" << 'EOF'
|
|
|
|
TEMP_PATH=${{runner.temp}}/docs_check
|
|
|
|
REPO_COPY=${{runner.temp}}/docs_check/ClickHouse
|
|
|
|
EOF
|
2021-12-01 10:27:46 +00:00
|
|
|
- name: Download changed images
|
2022-12-19 20:02:35 +00:00
|
|
|
uses: actions/download-artifact@v3
|
2021-12-01 10:27:46 +00:00
|
|
|
with:
|
|
|
|
name: changed_images
|
2021-12-09 18:09:46 +00:00
|
|
|
path: ${{ env.TEMP_PATH }}
|
2021-12-01 10:27:46 +00:00
|
|
|
- name: Check out repository code
|
2022-12-23 16:54:19 +00:00
|
|
|
uses: ClickHouse/checkout@v1
|
2022-12-20 00:03:19 +00:00
|
|
|
with:
|
|
|
|
clear-repository: true
|
2021-12-01 10:27:46 +00:00
|
|
|
- name: Docs Check
|
|
|
|
run: |
|
2022-01-13 18:06:35 +00:00
|
|
|
cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH"
|
|
|
|
cd "$REPO_COPY/tests/ci"
|
2021-12-01 10:27:46 +00:00
|
|
|
python3 docs_check.py
|
|
|
|
- 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-01-13 18:06:35 +00:00
|
|
|
sudo rm -fr "$TEMP_PATH"
|
2022-05-06 12:45:01 +00:00
|
|
|
FinishCheck:
|
|
|
|
needs:
|
|
|
|
- StyleCheck
|
|
|
|
- DockerHubPush
|
|
|
|
- DocsCheck
|
|
|
|
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-12-20 00:03:19 +00:00
|
|
|
with:
|
|
|
|
clear-repository: true
|
2022-05-06 12:45:01 +00:00
|
|
|
- name: Finish label
|
|
|
|
run: |
|
|
|
|
cd "$GITHUB_WORKSPACE/tests/ci"
|
|
|
|
python3 finish_check.py
|
2022-09-08 15:21:23 +00:00
|
|
|
python3 merge_pr.py --check-approved
|