Skip to content

CherryPick

CherryPick #8128

Workflow file for this run

name: CherryPick
env:
# Force the stdout and stderr streams to be unbuffered
PYTHONUNBUFFERED: 1
concurrency:
group: cherry-pick
# Never cancel the run that is already looping. GitHub keeps exactly one newer
# run pending, so it takes over the moment this one exits, and it cancels any
# pending run older than that: the in-progress loop is never interrupted and no
# more than one successor is ever waiting.
cancel-in-progress: false
on: # yamllint disable-line rule:truthy
schedule:
# Every 20 minutes. Offset from round values (e.g. */20 -> :00/:20/:40),
# which are popular and get their launches delayed by GitHub.
#
# A tick that fires while the Python loop is running is not wasted work: it is
# the successor that starts as soon as the loop exits, and it is what restarts
# the loop within 20 minutes if a run dies early.
- cron: '9,29,49 * * * *'
workflow_dispatch:
jobs:
CherryPick:
runs-on: [self-hosted, style-checker-aarch64]
# The loop stops on its own well before this; the timeout only bounds a
# single hung iteration.
timeout-minutes: 200
steps:
- name: Set envs
# https://docs.github.com/en/actions/learn-github-actions/workflow-commands-for-github-actions#multiline-strings
run: |
cat >> "$GITHUB_ENV" << 'EOF'
TEMP_PATH=${{runner.temp}}/cherry_pick
ROBOT_CLICKHOUSE_SSH_KEY<<RCSK
${{secrets.ROBOT_CLICKHOUSE_SSH_KEY}}
RCSK
REPO_OWNER=ClickHouse
REPO_NAME=ClickHouse
REPO_TEAM=core
EOF
- name: Check out repository code
uses: ClickHouse/checkout@v1
with:
clear-repository: true
token: ${{secrets.ROBOT_CLICKHOUSE_COMMIT_TOKEN}}
fetch-depth: 0
- name: Debug Info
uses: ./.github/actions/debug
- name: Cherry pick
working-directory: tests/ci
run: python3 cherry_pick.py --loop
- 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"