Say No to Jenkins UI : python-jenkins is the solution
Sagar Jain (~sagar875) |
Jenkins UI is one of the worst user experience, so far in our software community. But on the brighter side, we all need Jenkins for our continuous integration, validations and deployments. The question here is, being ourselves software engineers, do we really need Jenkins UI?
Python Jenkins is a python wrapper for the Jenkins REST API which aims to provide a more conventionally pythonic way of controlling a Jenkins server. It provides a higher-level API containing a number of convenience functions.
We like to use python-jenkins to automate our Jenkins servers. Here are some of the things you can use it for:
- Create new jobs
- Copy existing jobs
- Delete jobs
- Update jobs
- Get a job’s build information
- Start a build on a job
- Get build results and logs
- and many more..
The talk will cover using hands-on code with python-jenkins library to perform above tasks and writing restful apis to do the same.
- Getting jenkins job parameters
- Building job with and without params.
- Editing and updating jenkins job using library
- Getting build status
- Getting logs or console output from jenkins build
Python Jenkins: https://python-jenkins.readthedocs.io/en/latest/
The talk will cover to spin up the jenkins instance locally, write some code to interact with the jobs and then explore the APIs provided by the python-jenkins.
Sagar Jain is a Senior Software Developer at PayPal, Chennai. He is a python backend developer, Machine learning enthusiast, Security Researcher and a bug bounty hunter. He was working with Amazon prior to Paypal. Sagar Jain was recently invited to Paypal Global Developer Conference 2019, San Jose, USA for speaking at Validations Platform. He promotes and contributes to Open source community.
Connect here: https://www.linkedin.com/in/sagar-jain-81b60841/
Github Contributions: https://github.com/satycool16/
Bug Bounty Hunter: https://hackerone.com/satycool