teraflik / ao-jenkins-api

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.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Jenkins API

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.

Installation

pip install jenkinsapi

Execution

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

References

https://jenkinsapi.readthedocs.io/en/latest/

About

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.


Languages

Language:Python 100.0%