NOTE: under construction, buggy, and not production-ready
A tool to notify you when Jenkins builds are done.
Jenkins has tons of various plugins and integrations to send notifications anywhere, from emails to teapots. Yet all of these require that the Job must contain some sendNotification(receiver)
code.
Meanwhile, there are cases where only you personally are interested in said notification. Perhaps you are an admin waiting for some build to release the node, so you can reboot it. Or maybe you are an eager tester waiting for someone else's build to finish. Especially if your Jenkins is not a CI but simple Automation server.
In that case, you have to monitor Jenkins jobs from outside. Enter jenot.
By using your username and API token to bang on Jenkins REST API and hope that at some point it responds with {"finished": true}
. In that case - cue fanfare, Zenity, telegram-send et. cetera.
git clone
python -m venv venv && . venv/bin/activate
pip install -e .[dev,test]
- debug in VS Code:
// launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "jenot.qt",
"type": "python",
"request": "launch",
"module": "jenot.qt"
}
]
}
- folder
test/unit
contains unit tests that can should be runnable on their own - folder
test/integration
contains system tests that will require Jenkins instance docker-compose up -d
pytest
In VS Code, command:python.runtests
should work after applying these settings:
// settings.json
{
"python.testing.pytestEnabled": true,
"python.testing.pytestArgs": [
"test"
],
"python.testing.unittestEnabled": false,
}
To run by hotkey (default is Alt+A
), use this task:
// tasks.json
{
"version": "2.0.0",
"tasks": [
{
"label": "pytest",
"command": "${command:testing.runAll}",
"problemMatcher": [],
"group": {
"kind": "test",
"isDefault": true
}
}
]
}
pip install https://github.com/Artalus/jenot/archive/refs/heads/master.zip
- TODO: provide executables from pyinstaller or something