The tool you've been waiting for
Get notified whenever your gitlab-ci pipeline starts, finishes, and what its result is (along with a quick-access link to its page) This should compatible with every linux distro that is compatible with native notifications, using the notify-send command.
This part is a bit long just for clarity, this should take 3 minutes tops
Open your gitlab project/repository in a new tab and perform the steps there
- Visit your project page by clicking its' name at the left sidebar, just above
Pinned
- Click the
⋮
(three dots) on the right of your screen (next to the Fork button) - Click
Copy project ID:
, and SAVE this somewhere, this is your ID
- Click your profile picture in the top left, then click
Preferences
- In the sidebar, click
Access Tokens
- Click the
Add new token
button on the right - Pick a name, set the expiration date to far away in the future
- Check ALL the checkboxes
- Copy and SAVE the token generated (shown as ····), this is your KEY
Open a new tab in your terminal: Ctrl + Shift + T Make sure you're in the same folder as the script is
Run this line:
sh running.sh <ID> <KEY>
Important: Replace <ID>
with your own Project ID, and <KEY>
with your own API Key
That's all! Any future pipelines on your repository should notify you on runs and results.
Open the running.sh
file in your preferred text editor, and change the SHORT_NOTIF
, LONG_NOTIF
or DEBUG
variables for more customization.
SHORT_NOTIF
is how many milliseconds thepipeline running!
message appears forLONG_NOTIF
is how many milliseconds thepipeline success / failed
message appears forDEBUG
can be set to blank in order to see the API GET results in your terminal.