4
votes

I have seen some duplicate questions but the answers didn't seem to help. The following is what I need: I have the upstream Job A and its downstream Job B. I use parameterized trigger plugin to kick off Job B once Job A finishes successfully.

I want the kicked off Job B to have the same build number and use the same SVN revision which Job A used to simplify things (Both jobs use separate workspaces BTW.)

Under Job A, I checked the "Trigger parameterized build on other projects" and added the subversion revision and current build parameters to the parameters for Job B when stable.

Under Job B, I checked the "This build is parameterized" and used SVN_REVISION as a string parameter with default HEAD; and BUILD_NUMBER as a run parameter of Job A. Under SCM, for SVN url, I entered: http:// svn-path-here/trunk@$SVN_REVISION

Doing this always pulls the HEAD and uses different build number. Any help is appreciated. Thanks.

1

1 Answers

2
votes

A quick web search reveals:

  • With the parametrized build trigger, you need to use a "peg revision" in the SVN URL. E.g. .../repository/trunk@${SVN_REVISION}
  • Or you can use Tracking SVN plugin.

See this thread.