Script to call the Jenkins API on the specified ENDPOINT to list all active jobs, with status of the last successful build of a specified job.
The client API library used is jenkinsapi.
pip install jenkinsapi
Specify your TOKEN
, ENDPOINT
and JOBNAME
inside the script.
TOKEN = 'abcdef'
ENDPOINT = 'http://localhost:8080'
JOBNAME = 'test-job'
Then open console and run
python3 main.py