-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge MR 'feat: add GL Runner mgmt script' into 'main'
See merge request el-capitano/dotfiles!456
- Loading branch information
Showing
8 changed files
with
92 additions
and
6 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
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
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
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
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
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
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
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,30 @@ | ||
# set -g gl_runner_optspec 'b/backend=' no-plan | ||
|
||
function gl_runner --description 'Manage the Hetzner Cloud Runner.' | ||
set -l up_schedule_id '2691862' | ||
set -l down_schedule_id '383558' | ||
set -l project_path 'el-capitano/operations/hetzner-cloud-runners' | ||
|
||
if test -z $argv | ||
echo "No command given: set either 'up' or 'down'" | ||
return 1 | ||
end | ||
|
||
set -l action $argv[1] | ||
|
||
if test $action = "up" | ||
echo "Starting runner..." | ||
glab -R $project_path schedule run $up_schedule_id | ||
else if test $action = "down" | ||
echo "Stopping runner..." | ||
glab -R $project_path schedule run $down_schedule_id | ||
|
||
else | ||
echo "Unknown command, set either 'up' or 'down'" | ||
return 1 | ||
end | ||
|
||
|
||
sleep 5 # Pipeline creation is async, so we wait... | ||
glab -R $project_path ci status -b main --live --compact | ||
end |