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
.
Copy the .env.example
file to .env
and fill in the configuration parameters.
Available configuration parameters are:
GITLAB_ENDPOINT
Root URL to your GitLab instanceGITLAB_TOKEN
Token used to access your GitLab instance API. You can create one in Profile Settings > Personal Access TokensPOLL_INTERVAL
Interval, in seconds, when the script will check for updatesFILTER_USERNAME
A GitLab username to filter builds by (you probably don't want to be spammed by your coworkers builds) (optional)FILTER_STAGE
Only 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
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.