A Python script informing you about GitLab builds progress with native system notifications.
Python 3. May eventually works with Python 2 (not tested).
Clone this repo, and then the usual
pip install -r requirements.txt.
.env.example file to
.env and fill in the configuration parameters.
Available configuration parameters are:
GITLAB_ENDPOINTRoot URL to your GitLab instance
GITLAB_TOKENToken used to access your GitLab instance API. You can create one in Profile Settings > Personal Access Tokens
POLL_INTERVALInterval, in seconds, when the script will check for updates
FILTER_USERNAMEA GitLab username to filter builds by (you probably don't want to be spammed by your coworkers builds) (optional)
FILTER_STAGEOnly filter builds in this stage name (optional)
python run.py --project=4
--project is a GitLab project ID.
Best usage is to run it as a daemon or service (you probably don't want an ever-running terminal window).
On Windows, use the Non-Sucking Service ManagerIt actually don't works well with Python scripts
- On Linux, use Supervisor, or a daemon or even a cron job running at boot/reboot time
- On Mac OS, use launchctl
How it works
This script, once started, polls the GitLab builds API of a specific project every 60 seconds (by default) indefinitely. It internally maintain a list of every builds that are in progress, thus allowing us to display native notifications when build statuses are updated.