|
1 | 1 | # set -g gl_runner_optspec 'b/backend=' no-plan |
2 | 2 |
|
3 | 3 | function gl_runner --description 'Manage the Hetzner Cloud Runner.' |
4 | | - set -l up_schedule_id '2691862' |
5 | | - set -l down_schedule_id '383558' |
6 | | - set -l project_path 'el-capitano/operations/hetzner-cloud-runners' |
| 4 | + set -l up_schedule_id 2691862 |
| 5 | + set -l down_schedule_id 383558 |
| 6 | + set -l project_path el-capitano/operations/hetzner-cloud-runners |
7 | 7 |
|
8 | 8 | if test -z $argv |
9 | | - echo "No command given: set either 'up' or 'down'" |
10 | | - return 1 |
| 9 | + echo "No command given: set either 'up' or 'down'" |
| 10 | + return 1 |
11 | 11 | end |
12 | 12 |
|
13 | 13 | set -l action $argv[1] |
14 | 14 |
|
15 | | - if test $action = "up" |
16 | | - echo "Starting runner..." |
17 | | - glab -R $project_path schedule run $up_schedule_id |
18 | | - else if test $action = "down" |
19 | | - echo "Stopping runner..." |
20 | | - glab -R $project_path schedule run $down_schedule_id |
| 15 | + if test $action = up |
| 16 | + echo "Starting runner..." |
| 17 | + glab -R $project_path schedule run $up_schedule_id |
| 18 | + else if test $action = down |
| 19 | + echo "Stopping runner..." |
| 20 | + glab -R $project_path schedule run $down_schedule_id |
21 | 21 |
|
22 | 22 | else |
23 | | - echo "Unknown command, set either 'up' or 'down'" |
24 | | - return 1 |
| 23 | + echo "Unknown command, set either 'up' or 'down'" |
| 24 | + return 1 |
25 | 25 | end |
26 | 26 |
|
27 | | - |
28 | 27 | sleep 5 # Pipeline creation is async, so we wait... |
29 | 28 | glab -R $project_path ci status -b main --live --compact |
30 | 29 | end |
0 commit comments