Back to blog

alpha-3 release Pipeline as YAML (Simple pull request plugin)

Abhishek Gautam
August 14, 2018

About me

I am Abhishek Gautam, 3rd year student from Visvesvaraya National Institute of technology, India, Nagpur. I was a member of ACM Chapter and Google student developer club of my college. I am passionate about automation.

Project Summary

This is a GSoC 2018 project.

This project aims to develop a pull request Job Plugin. Users should be able to configure job type using YAML file placed in root directory of the Git repository being the subject of the pull request. The plugin should interact with various platforms like Bitbucket, Github, Gitlab, etc whenever a pull request is created or updated.

Plugin detects the presence of certain types of reports at conventional locations, and publish them automatically. If the reports are not present at their respective conventional location, the location of the report can be configured in the YAML file.

Project Repository

Code changes

All the pull requests made can be found here

List of major pull requests.

Phase 1
  • PR-5: Git wrappers like clone, pull, checkout, pullChangesOfPullrequest, merge, deleteBranch and merge added.

  • PR-6: Yaml to Declarative Pipeline code generation.

Please see Phase 1 blog post

Phase 2
  • PR-11: Implemented StepConfigurator using Jenkins configuration as code plugin.

  • PR-19: Unit tests created for agent and yaml to pipeline generation.

Please see Phase 2 blog post

Phase 3
  • PR-25: Declarative pipeline code generator code exported to extensions for extensibility and support of custom sections

Jenkinsfile.yaml example

Documentation of Jenkinsfile.yaml and yaml format can be found here

Tasks completed in Coding Phase 3

  1. Add unit tests, JenkinsRule tests JENKINS-52495

  2. Refactor snippet generator to extensions (JENKINS-52491)

  3. Plugin overview (Present in README.md)

Future tasks

  1. Release 1.0 (JENKINS-52519)

  2. Support the “when” Declarative Pipeline directive (JENKINS-52520)

  3. Nice2have: Support hierarchical report types (JENKINS-52521)

  4. Acceptance Test Harness tests JENKINS-52496

  5. Automatic Workspace Cleanup when PR is closed (JENKINS-51897)

  6. Test Multi-Branch Pipeline features support:

    1. Support for webhooks (JENKINS-51941)

    2. Check if trusted people have approved a pull request and start build accordingly (JENKINS-52517)

  7. Finalize documentation (JENKINS-52518)

  8. Test the integration with various platforms Bitbucket, Gitlab, Github.

Phase 3 evaluation presentation video

Phase 3 evaluation presentation slides

My GSoC experience

Student applications started on March 12 16:00 UTC and ended on March 27 16:00 UTC. Application period allowed me to explore many new technology and platforms that are making peoples life easy.

Before starting of the application period I did not know anything about Jenkins. I found Jenkins organisation on the GSoC organisations page and came to know that I is a CI/CD platform that is used automate various things related to software development. I studied about Jenkins online and went through the problem statements provided by some mentors.

I decided that to work on Simple Pull-Request Job Plugin project. Then I wrote a draft proposal for this project and received many comments to refactor the proposal and enhance its quality from the mentors, then finally I submitted my final proposal to Google.

I was able to complete most of the tasks decided in Phase 1 and 2. After Phase 2 I was not able to give time to the project because of the placement season in the my college. I modified the code so that other plugin developers can contribute to it by Jenkins extensions.

All the mentors made themselves available for most of the weekly calls and provided many valuable suggestions during the entire period of GSoC. Sometimes I was not able to communicate effectively. As communication is the key while working remotely, mentors suggested to communicate more thorough gitter chat.

My overall experience of GSoC was good and all the mentors helped me as they can all times. This project allowed me to explore Jenkins and the services offered by it. I am allowed to work on the project after GSoC ends (This is a good thing).

About the author

Abhishek Gautam

Abhishek is a 3rd year Computer Science student from Visvesvaraya National Institute of Technology, Nagpur, India. He has done some website projects for his college technical festival. He is also a regular competitive programmer (abhishekg1128 at codechef). He has done two internships as a Game Programmer as well. He was a member of ACM Chapter and Google student developer club of his college. His interest in automation motivated his participation in the Jenkins GSOC 2018 program.