mirror of
https://github.com/kestra-io/kestra.git
synced 2025-12-19 18:05:41 -05:00
chore: add useful scripts for RC
This commit is contained in:
21
dev-tools/rc-manual-utilities/gh_empty-cache.sh
Normal file
21
dev-tools/rc-manual-utilities/gh_empty-cache.sh
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
set -e
|
||||||
|
|
||||||
|
OWNER='kestra-io'
|
||||||
|
REPO=$1
|
||||||
|
|
||||||
|
if [[ -z "$REPO" ]]; then
|
||||||
|
echo -e "Missing required argument repo\n";
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "get caches for /repo/$OWNER/$REPO/action/caches"
|
||||||
|
|
||||||
|
gh api \
|
||||||
|
-H "Accept: application/vnd.github+json" \
|
||||||
|
-H "X-GitHub-Api-Version: 2022-11-28" \
|
||||||
|
/repos/$OWNER/$REPO/actions/caches > caches.json
|
||||||
|
|
||||||
|
for id in $(jq -r '.actions_caches[].id' caches.json); do
|
||||||
|
echo "delete cache with ID: $id"
|
||||||
|
gh api --method DELETE "/repos/$OWNER/$REPO/actions/caches/$id"
|
||||||
|
done
|
||||||
|
|
||||||
28
dev-tools/rc-manual-utilities/gh_launch-release-workflow.sh
Normal file
28
dev-tools/rc-manual-utilities/gh_launch-release-workflow.sh
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Usage: ./trigger-workflow.sh <repo> <branch>
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ -z "$1" ]; then
|
||||||
|
echo "Usage: $0 <repo> <branch-name>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$2" ]; then
|
||||||
|
echo "Usage: $0 <repo> <branch-name>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
REPO="$1"
|
||||||
|
BRANCH="$2"
|
||||||
|
OWNER="kestra-io"
|
||||||
|
WORKFLOW="main.yml"
|
||||||
|
|
||||||
|
echo "Triggering workflow '$WORKFLOW' on branch '$BRANCH'..."
|
||||||
|
|
||||||
|
gh workflow run "$WORKFLOW" \
|
||||||
|
--repo "$OWNER/$REPO" \
|
||||||
|
--ref "$BRANCH"
|
||||||
|
|
||||||
|
echo "Triggered. Run 'gh run list --repo $OWNER/$REPO --branch $BRANCH' to check status."
|
||||||
|
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ -z "$1" ]; then
|
||||||
|
echo "Usage: $0 <repo> <branch-name>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$2" ]; then
|
||||||
|
echo "Usage: $0 <repo> <branch-name>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
REPO="$1"
|
||||||
|
BRANCH="$2"
|
||||||
|
|
||||||
|
echo "delete cache and restart build for '$REPO' on branch '$BRANCH'..."
|
||||||
|
sh ./empty-cache.sh $REPO
|
||||||
|
sh ./launch-release-workflow.sh $REPO $BRANCH
|
||||||
|
echo "delete and restart done for '$REPO' on branch '$BRANCH'..."
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
set -e
|
||||||
|
|
||||||
|
OWNER='kestra-io'
|
||||||
|
|
||||||
|
gh repo list "$OWNER" --limit 1000 --json name -q '.[] | select(.name | startswith("plugin-")) | .name' |
|
||||||
|
while read -r repo; do
|
||||||
|
echo "Calling script for $repo"
|
||||||
|
sh launch-release-workflow.sh $repo master &
|
||||||
|
done
|
||||||
|
|
||||||
Reference in New Issue
Block a user