14

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?

djs
  • 4,626
  • 2
  • 28
  • 38
  • What does `http:///job//changes` say? – malenkiy_scot Jun 05 '12 at 15:47
  • That url has no associated api, and doesn't associate commits with builds. I assume I'll need to add support for this task to Jenkins, but I've left this question open until that happens. – djs Jun 07 '12 at 16:33

1 Answers1

5

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_fingerprint enter image description here

reechard
  • 861
  • 6
  • 22