Pagure Jenkins Interaction
Farhaan Bukhsh (~farhaanbukhsh) |
5
Description:
Pagure Jenkins interaction to find the faulty Pull Request
Description
It is one of the project that we are working on in the Pagure team, the aim is to make a service which triggers the Jenkins build and monitor it. Then fetches the build status and attach a label to the Pull Request.
What audience can expect?
Audience can expect to get deep insight about Pagure, a general understanding of how Jenkins work. For that reason they get to know what Jenkins is. They get to know how they can write a service and monitor builds and trigger builds in Jenkins.
Audience also get to learn the basics of CI and the insight that Python can be used to write a scalable code reviewing system.
Parts of Talk:
1. Introduction to Pagure
2. Introduction to CI
3. Introduction to Jenkins
4. Introduction to Fedmsg
5. The need for the plugin
6. Architecture of the service to interact with Jenkins
Introduction to Pagure
Pagure is a light-weight git-centered forge based on pygit2.
Currently, Pagure offers a decent web-interface for git repositories, a simplistic ticket system (that needs improvements) and possibilities to create new projects, fork existing ones and create/merge pull-requests across or within projects. Few examples are Travis CI, Jenkins etc
Introduction to CI
CI or Continuous integration is a practice which actually helps the developers to test their features with respect to integrating it with the project. It actually tells the developers if the changes the made to the code base is stable or not.
Introduction to jenkins
Jenkins is an integration management system (CI) used by most of the apps in fedora for automated testing and integration.
Introduction to Fedmsg
fedmsg (Fedora-Messaging) is a python package and API used around Fedora Infrastructure to send and receive messages to and from applications.
Need for the plugin
The need arose when a pull request to Pagure is merged and it cause the build to fail. We need to find out which pull request cause the build to fail. The whole gist is to attach a build report to each pull request so that we know the status of the Jenkins build looking at the pull request.
Architecture
Jenkins service act as the intermediate node between the "pull request" and the "Jenkins". Now whenever a pull request is merged it informs the Jenkins service. Now the build is being monitored continuously to find out the build status. When the build status is generated the service takes the status and attach it to the particular pull request.
Prerequisites:
Basic Python
Content URLs:
Pagure
https://docs.pagure.org/pagure/
Jenkins
https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+CLI
CI with Pagure
https://lubomir.github.io//en/2016-04-26-slightly-richer-man-ci.html
Fedmsg
http://www.fedmsg.com/en/latest/
Content Written By me:
https://farhaanbukhsh.wordpress.com/2016/06/02/pagure-ci/
https://farhaanbukhsh.wordpress.com/2016/05/22/step-2-configuring-jenkins/
https://farhaanbukhsh.wordpress.com/2016/05/17/part-1-setting-up-fedmsg/
Code
The code is hosted here , the PR i under review and will be merged soon :
https://pagure.io/fork/farhaan/pagure/branch/jenkins-hook
Speaker Info:
My name is Farhaan Bukhsh, I am a Foss enthusiast and evangelist, I love to learn new technologies and experiment with them. I have been contributing to fedora infra for a year now, I got through GSoC this year for Pagure under Fedora. I have been a part of organisation like FSMK(Free Software Movement Karnataka) and Dgplug. I am in my 3rd year of engineering from DSCE Bangalore.
Speaker Links:
Blog
https://farhaanbukhsh.wordpress.com/
https://twitter.com/fhackdroid
GitHub
https://github.com/farhaanbukhsh
IRC
fhackdroid on #dgplug, #fedora-apps