Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Commit based view of Jenkins builds

I would like to be able to present a view of Jenkins builds similar to the buildbot console view. With Jenkins out of the box, there appears to be really no good way to associate a commit with a build. You have to access the specific built to determine what commit it was building.

I would like to be able to show status on what commits have been tested in a particular branch, so we know if a commit was skipped or if the latest commit has not yet been tested.

I tried using the Jenkins API for this, but I found that I could only see the SHA1 hash for a git commit via the build itself, i.e. via http://server/job/job-name/388/api/json. So, the only way I can see to take a commit and find builds for it is to iterate through every build in a job and retrieve its associated build info. This is certainly not going to be efficient and fast. Is there another way to do it?

like image 394
djs Avatar asked May 25 '12 21:05

djs


People also ask

What is commit in Jenkins?

The conventional commits plugin is a Jenkins plugin to programmatically determine the next semantic version of a git repository using: Last tagged version. Commit message log. Current version of the project.

How do you configure automatic builds in Jenkins?

In Jenkins, go to the project configuration of the project for which you want to run an automated build. In the 'Build Triggers' section, select 'Build when a change is pushed to GitHub'. Save your project. Jenkins will now run the build when you push your code to the GitHub repository.


1 Answers

Imperfect Answer: put the "revision number" you care about in the package name of all related artifacts, and use the "fingerprint" feature.

For example: my "product package" artifacts have a revision number, and if I carried that through to the "test package" artifact (which includes the unpacked product artifact) you would be able to track that revision number via the "artifact/fingerprint" feature, and show which test jobs used it. Below, you can't tell with a single click which test used which "commit."

prod_fingerprintenter image description here

like image 159
reechard Avatar answered Sep 21 '22 13:09

reechard