forked from ClickHouse/ClickHouse
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ClickHouse#56534 from ClickHouse/backport/23.3/56385
Backport ClickHouse#56385 to 23.3: Rewrite jobs to use callable workflow
- Loading branch information
Showing
12 changed files
with
422 additions
and
1,951 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: Clean runner | ||
description: Clean the runner's temp path on ending | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Clean | ||
shell: bash | ||
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 "${{runner.temp}}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Common setup | ||
description: Setup necessary environments | ||
inputs: | ||
job_type: | ||
description: the name to use in the TEMP_PATH and REPO_COPY | ||
default: common | ||
type: string | ||
nested_job: | ||
description: the fuse for unintended use inside of the reusable callable jobs | ||
default: true | ||
type: boolean | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Setup and check ENV | ||
shell: bash | ||
run: | | ||
echo "Setup the common ENV variables" | ||
cat >> "$GITHUB_ENV" << 'EOF' | ||
TEMP_PATH=${{runner.temp}}/${{inputs.job_type}} | ||
REPO_COPY=${{runner.temp}}/${{inputs.job_type}}/git-repo-copy | ||
EOF | ||
if [ -z "${{env.GITHUB_JOB_OVERRIDDEN}}" ] && [ "true" == "${{inputs.nested_job}}" ]; then | ||
echo "The GITHUB_JOB_OVERRIDDEN ENV is unset, and must be set for the nested jobs" | ||
exit 1 | ||
fi | ||
- name: Setup $TEMP_PATH | ||
shell: bash | ||
run: | | ||
# to remove every leftovers | ||
sudo rm -fr "$TEMP_PATH" | ||
mkdir -p "$REPO_COPY" | ||
cp -a "$GITHUB_WORKSPACE"/. "$REPO_COPY"/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.