glw
watch a gitlab pipeline. ding when done.
● ● ●glw
14:02:11 watching pipeline #987654 (root status: running)
14:02:11 #987654 running https://gitlab.com/foo/bar/-/pipelines/987654
14:03:42 #987654 → discovered downstream #987655 https://gitlab.com/foo/deploy/-/pipelines/987655
14:03:42 #987655 created https://gitlab.com/foo/deploy/-/pipelines/987655
14:04:11 #987655 manual https://gitlab.com/foo/deploy/-/pipelines/987655
↑ desktop notification fires here ("needs manual trigger")
14:06:31 #987655 running
14:08:01 #987654 success
14:08:11 #987655 success
14:08:11 ✓ done — success: #987654 #987655
↑ second notification fires here
one bash file. zero deps beyond glab. mac + linux. caveman tier.
install
prereq — install glab and log in once:
glab auth login
then drop glw somewhere on your $PATH:
sudo install -m 0755 glw /usr/local/bin/glw
(or chmod +x glw && cp glw ~/bin/ — whatever. it's one script.)
use
glw # latest pipeline on current branch
glw 1234567 # by pipeline id
glw https://gitlab.com/foo/bar/-/pipelines/1234567 # by url, cross-project
chain it:
glw && ./deploy.sh
exits 0 on all-green, 1 if anything failed/canceled. ctrl-c to bail.
config
GLW_POLL=10 # seconds between polls (default 10)
glab handles auth / token / instance host — glw doesn't.
notifications
- mac — terminal-notifier, falls back to
osascript - linux —
notify-send(libnotify) - headless — terminal bell. exit code still works for
glw && deploy.