JeNot - A tool to notify you when Jenkins builds are done.

Overview

JeNot - Jenkins Notifications

codecov tests

NOTE: under construction, buggy, and not production-ready

What

A tool to notify you when Jenkins builds are done.

Why

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.

How

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.


Developing

  • 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"
        }
    ]
}

Testing

  • 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
{
    "pythonTestExplorer.testFramework": "pytest",
    "python.testing.pytestEnabled": true,
}

To run by hotkey (default is Alt+A), use this task:

// tasks.json
{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "pytest",
            "command": "${command:python.runtests}",
            "problemMatcher": [],
            "group": {
                "kind": "test",
                "isDefault": true
            }
        }
    ]
}

Installing

  • pip install https://github.com/Artalus/jenot/archive/refs/heads/master.zip
  • TODO: provide executables from pyinstaller or something
You might also like...
Keval allows you to call arbitrary Windows kernel-mode functions from user mode, even (and primarily) on another machine.
Keval allows you to call arbitrary Windows kernel-mode functions from user mode, even (and primarily) on another machine.

Keval Keval allows you to call arbitrary Windows kernel-mode functions from user mode, even (and primarily) on another machine. The user mode portion

A clock app, which helps you with routine tasks.

Clock This app helps you with routine tasks. Alarm Clock Timer Stop Watch World Time (Which city you want) About me Full name: Matin Ardestani Age: 14

This python program will display all SSID usernames and SSID passwords you once connected to your laptop
This python program will display all SSID usernames and SSID passwords you once connected to your laptop

Windows-Wifi-password-extractor This python program will display all SSID usernames and SSID passwords you once connected to your laptop How to run th

This is Cool Utility tools that you can use in python.

This is Cool Utility tools that you can use in python. There are a few tools that you might find very useful, you can use this on pretty much any project and some utils might help you a lot and save so much time since it’s a simple function.

This repository contains scripts that help you validate QR codes.

Validation tools This repository contains scripts that help you validate QR codes. It's hacky, and a warning for Apple Silicon users: the dependencies

A small python library that helps you to generate localization strings for your mobile projects.

LocalizationUtiltiy A small python library that helps you to generate localization strings for your mobile projects. This small script aims to help yo

This is a package that allows you to create a key-value vault for storing variables in a global context

This is a package that allows you to create a key-value vault for storing variables in a global context. It allows you to set up a keyring with pre-defined constants which act as keys for the vault. These constants are then what is stored inside the vault. A key is just a string, but the value that the key is mapped to can be assigned to any type of object in Python. If the object is serializable (like a list or a dict), it can also be writen to a JSON file You can then use a decorator to annotate functions that you want to have use this vault to either store return variables in or to extract variables to be used as input for the function.

A utility that makes it easy to work with Python projects containing lots of packages, of which you only want to develop some.

Mixed development source packages on top of stable constraints using pip mxdev [mɪks dɛv] is a utility that makes it easy to work with Python projects

A simple dork generator written in python that outputs dorks with the domain extensions you enter

Dork Gen A simple dork generator written in python that outputs dorks with the domain extensions you enter in a ".txt file". Usage The code is pretty

Comments
  • feat: introduce unit-tests for qt

    feat: introduce unit-tests for qt

    first part of many for #51 see https://github.com/pytest-dev/pytest-qt/issues/282 and https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html about pytest-qt aborting with core dump

    opened by Artalus 1
  • Crash when valid generic jenkins url is pasted instead of build url

    Crash when valid generic jenkins url is pasted instead of build url

    2022-03-22 15:07:52,913 - ERROR - failed to parse api response; got this:
    _class: org.jenkinsci.plugins.workflow.job.WorkflowJob
    buildable: true
    builds:
    - _class: org.jenkinsci.plugins.workflow.job.WorkflowRun
      number: 138
    ...
    
    Traceback (most recent call last):
      File "/mnt/filedump/git/jenot/src/jenot/__init__.py", line 48, in iterate
        if resp['building']:
    KeyError: 'building'
    2022-03-22 15:07:52,936 - ERROR - unhandled exception:
    Traceback (most recent call last):
      File "/mnt/filedump/git/jenot/src/jenot/qt/processor.py", line 30, in _run
        result = run(self.jenkins_base_url, self.user, self.token, self.build_part)
      File "/mnt/filedump/git/jenot/src/jenot/__init__.py", line 68, in run
        result, actual_url = iterate(url, USER, TOKEN)
      File "/mnt/filedump/git/jenot/src/jenot/__init__.py", line 48, in iterate
        if resp['building']:
    KeyError: 'building'
    NoneType: None
    
    bug 
    opened by Artalus 1
  • crashes on linux when launched from xfce menu

    crashes on linux when launched from xfce menu

    Crashes after adding a new watch. Apparently, generates core dump somewhere inside qthread?

    journalctl output
    авг 19 13:57:17 dssl audit[186345]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=2 pid=186345 comm="QThread" exe="/usr/bin/python3.9" sig=6 res=1
    авг 19 13:57:17 dssl kernel: audit: type=1701 audit(1629370637.181:1086): auid=1000 uid=1000 gid=1000 ses=2 pid=186345 comm="QThread" exe="/usr/bin/python3.9" sig=6 res=1
    авг 19 13:57:17 dssl audit: BPF prog-id=73 op=LOAD
    авг 19 13:57:17 dssl audit: BPF prog-id=74 op=LOAD
    авг 19 13:57:17 dssl audit: BPF prog-id=75 op=LOAD
    авг 19 13:57:17 dssl kernel: audit: type=1334 audit(1629370637.241:1087): prog-id=73 op=LOAD
    авг 19 13:57:17 dssl kernel: audit: type=1334 audit(1629370637.241:1088): prog-id=74 op=LOAD
    авг 19 13:57:17 dssl kernel: audit: type=1334 audit(1629370637.241:1089): prog-id=75 op=LOAD
    авг 19 13:57:17 dssl systemd[1]: Started Process Core Dump (PID 186366/UID 0).
    авг 19 13:57:17 dssl kernel: audit: type=1130 audit(1629370637.244:1090): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@11-186366-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
    авг 19 13:57:17 dssl audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@11-186366-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
    авг 19 13:57:17 dssl systemd-coredump[186367]: [🡕] Process 186345 (jenotg) of user 1000 dumped core.
                                                      
                                                      Stack trace of thread 186365:
                                                      #0  0x00007fdadaacad22 raise (libc.so.6 + 0x3cd22)
                                                      #1  0x00007fdadaab4862 abort (libc.so.6 + 0x26862)
                                                      #2  0x00007fdad887c9bc n/a (/home/iivanov/.local/lib/python3.9/site-packages/PyQt5/Qt5/lib/libQt5Core.so.5 + 0x929bc)
                                                      #3  0x0000000000000000 n/a (n/a + 0x0)
    авг 19 13:57:17 dssl systemd[1]: [email protected]: Deactivated successfully.
    авг 19 13:57:17 dssl kernel: audit: type=1131 audit(1629370637.781:1091): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@11-186366-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
    авг 19 13:57:17 dssl audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@11-186366-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
    авг 19 13:57:17 dssl audit: BPF prog-id=75 op=UNLOAD
    авг 19 13:57:17 dssl audit: BPF prog-id=74 op=UNLOAD
    авг 19 13:57:17 dssl audit: BPF prog-id=73 op=UNLOAD
    авг 19 13:57:17 dssl kernel: audit: type=1334 audit(1629370637.964:1092): prog-id=75 op=UNLOAD
    авг 19 13:57:17 dssl kernel: audit: type=1334 audit(1629370637.964:1093): prog-id=74 op=UNLOAD
    авг 19 13:57:17 dssl kernel: audit: type=1334 audit(1629370637.964:1094): prog-id=73 op=UNLOAD
    
    bug 
    opened by Artalus 0
  • support only full urls for builds

    support only full urls for builds

    • it's literally easiser to copypaste full build url, than to construct a partial one
    • gui dialog already supports only urls with scheme
    • it will simplify the code too
    techdebt 
    opened by Artalus 0
Owner
C++ developer and build engineer. 'Sulatra' or 'Artalus94' on social media where my original nickname is already taken.
null
Basic loader is a small tool that will help you generating Cloudflare cookies

Basic Loader Cloudflare cookies loader This tool may help some people getting valide cloudflare cookies Installation ?? : pip install -r requirements.

IHateTomLrge 8 Mar 30, 2022
This tool lets you perform some quick tasks for CTFs and Pentesting.

This tool lets you convert strings and numbers between number bases (2, 8, 10 and 16) as well as ASCII text. You can use the IP address analyzer to find out details on IPv4 and perform abbreviation as well as expansion on IPv6 addresses.It can also perform a two's complement calculation as well.

Ayomide Ayodele-Soyebo 1 Jul 16, 2022
A python tool give n number of inputs and parallelly you will get a output by separetely

http-status-finder Hello Everyone!! This is kavisurya, In this tool you can give n number of inputs and parallelly you will get a output by separetely

KAVISURYA V 3 Dec 5, 2021
NetConfParser is a tool that helps you analyze the rpcs coming and going from a netconf client to a server

NetConfParser is a tool that helps you analyze the rpcs coming and going from a netconf client to a server

Aero 1 Mar 31, 2022
SH-PUBLIC is a python based cloning script. You can clone unlimited UID facebook accounts by using this tool.

SH-PUBLIC is a python based cloning script. You can clone unlimited UID facebook accounts by using this tool. This tool works on any Android devices without root.

(Md. Tanvir Ahmed) 5 Mar 9, 2022
Pampy: The Pattern Matching for Python you always dreamed of.

Pampy: Pattern Matching for Python Pampy is pretty small (150 lines), reasonably fast, and often makes your code more readable and hence easier to rea

Claudio Santini 3.5k Jan 6, 2023
Runes - Simple Cookies You Can Extend (similar to Macaroons)

Runes - Simple Cookies You Can Extend (similar to Macaroons) is a paper called "Macaroons: Cookies with Context

Rusty Russell 22 Dec 11, 2022
This utility lets you draw using your laptop's touchpad on Linux.

FingerPaint This utility lets you draw using your laptop's touchpad on Linux. Pressing any key or clicking the touchpad will finish the drawing

Wazzaps 95 Dec 17, 2022
Give you a better view of your Docker registry disk usage.

registry-du Give you a better view of your Docker registry disk usage. This small tool will analysis your Docker registry(vanilla or Harbor both work)

Nova Kwok 16 Jan 7, 2023
This code renames subtitle file names to your video files names, so you don't need to rename them manually.

Rename Subtitle This code renames your subtitle file names to your video file names so you don't need to do it manually Note: It only works for series

Mostafa Kazemi 4 Sep 12, 2021