GitHub Checks API for Jenkins Plugins

Project goal: Create a new plugin API so that plugins can publish GitHub checks status messages

Skills to study/improve: Java, REST API, GitHub

Details

Many projects use pull requests (in GitHub) or similar concepts (in GitLab, Bitbucket, etc.) in their development process. Typically, those pull requests are automatically built and verified with Jenkins. For each build of such a pull request Jenkins creates several reports that can be analyzed in corresponding Jenkins view: compile errors, test results, static analysis reports, code and mutation coverage, API contracts violations, etc.

Currently, GitHub shows only the overall status of a Jenkins build in such a pull request: i.e., you will see whether a build is successful or not, but you will not see why a build has failed. In order to see the details you need to navigate to the corresponding Jenkins views. It would improve the user experience if Jenkins would directly report detailed build results in a GitHub pull request using the Checks API. Then developers directly will see in the pull request view of GitHub what kind of problem failed a build.

Possible milestones for this project are:

  • Provide a basic implementation of the GitHub Checks API in a new Jenkins Plugin

  • Use this API from Jenkins Warnings plugin to report new Warnings in a pull request

  • Define a general API for pull requests and similar concepts (GitHub, GitLab, Bitbucket)

  • Use this API from other Jenkins plugins like code coverage, etc.

  • Add a low-level Pipeline step which allows reporting to Checks API

Quickstart

Before exploring the Jenkins features, it would make sense to familiarize yourself with GitHub Checks API.

This project is about implementing the GitHub API and using it in one or more consumers. So it makes sense to look into two different set of existing plugins:

Possible API

Possible consumers of the API

Development Environment for the Warnings Plugin:

Newbie-friendly issues

  1. Jason Warner, Introducing the Checks API, a better way to connect integrations and code, https://github.blog/2018-05-07-introducing-checks-api/

  2. Keavy McMinn, New Checks API public beta, https://developer.github.com/changes/2018-05-07-new-checks-api-public-beta/

  3. Jenkins Warning Next Generation Plugin, https://github.com/jenkinsci/warnings-ng-plugin

  4. Feature Request for the Warnings Plugin: https://issues.jenkins.io/browse/JENKINS-54072

  5. Example GitHub integration with Codacy , https://app.codacy.com/projects

  6. Example GitHub integration with Codecov, https://codecov.io

  7. GitHub Review Comments API, https://developer.github.com/v3/pulls/comments/

  8. GitHub Checks API, https://developer.github.com/v3/checks/

  9. Violations to GitHub Pull Request Comments Library, https://github.com/tomasbjerre/violation-comments-to-github-lib

  10. Existing Jenkins plugin that reports to GitHub Pull Requests with the Status API, https://plugins.jenkins.io/github-branch-source

  11. Jenkins CI Job that reports the status in GitHub, https://ci.jenkins.io/job/Plugins/job/warnings-ng-plugin/job/master/

  12. Pull Request to provide support for GitHub app authentication https://github.com/jenkinsci/github-branch-source-plugin/pull/269

  13. Provide Jenkins as a GitHub App, https://issues.jenkins.io/browse/JENKINS-57351

  14. Integration of CI tests with checks api https://developer.github.com/apps/quickstart-guides/creating-ci-tests-with-the-checks-api/

Potential Mentors

Project Links

Organization Links

> Go back to other GSoC 2020 project ideas