Question

Is it possible to get the Jenkins Promoted Builds plugin to invoke a second job, which in turn builds from the commit that was promoted, rather than from the latest revision?

So the flow would be something like this:

  • Commit A is made
  • 'Dev' job performs build #1 from commit A
  • Commit B is made
  • 'Dev' job performs build #2 from commit B
  • User manually promotes Dev #1
  • 'Staging' job builds #1 from commit A (not B)
Was it helpful?

Solution

There's a bug in Jenkins that prevents this from being possible.

Normally one would:

  • Install Promoted Builds plugin
  • Install Parameterized Trigger
  • Configure Job Dev to be promotable, specifying "Trigger/call builds on other projects", then setting parameter of "Pass-through Git Commit that was built"

Sadly there appears to be a bug in the Promoted Builds plugin that means not all data are passed. There exists a fix, but it appears to be awaiting integration.

I've raised a ticket in Jenkins' JIRA which y'all should vote on if you're also afflicted by this issue.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top