A CLI programa that lists all jobs on a Jenkins server with more information than their respective names.
- Implements the
jenkins_jobs
CLI that allows the reporting of jobs in a Jenkins server. The reports includes information of job name, job type, job description, if the job is executed through a schedule and the schedule itself. - Implements the
jenkins_exporter
CLI that allows the exporting of jobs information to a file in a Shelve format, which allows to export this information and use it locally for development or even withjenkins_jobs
CLI.
- Python 3, with version >= 3.8.
- A Jenkins user and the related access token for authentication.
- The Jenkins server URL.
You can install this project module straight from PyPi:
pip install jenkins_jobs
Then just fire the jenkins_job
CLI:
$ jenkins_jobs --user admin --token 116f3e55f677416a7c054faa20fbbcf0be --jenkins http://localhost:8080
freestyle-sample|FreestyleJob|Sample freestyle job|True|H H 1,15 1-11 *
Maven Sample|MavenJob|This is a sample Maven plugin based job, see https://plugins.jenkins.io/maven-plugin/|True|H H 1,15 1-11 *
pipeline-sample|PipelineJob|This is a sample pipeline job|True|H/15 * * * *
You should be able to just import this output as a CSV with |
(pipe) as the
field separator. In future, different output formats might be provided.
Please visit readthedocs.io for more details on this project.