3
votes

I'm using Jenkins and the Promoted Builds plug-in. When I promote a build, I want to trigger a new build Job and pass through the specific Subversion Revision that the promoted build used.

I've got the Trigger Parameterized Builds plug-in installed, and so I can tell my Promoted Build to invoke a parameterized build, and there's even an option in "Add Parameters" to specify "Subversion revision".

This doesn't actually seem to do anything though; the invoked parameterized build still uses the latest version fromt he SVN repository.

Any ideas what I'm missing?

1
What are you using as your repository URL?Sagar
In the job to be built after the build is promoted? Just the usual project repository URL: svn://svn.company.com/Departments/Dept/Project/trunk/. I've tried using @${SVN_REVISION} but it doesn't get parsed.EngineerBetter_DJ

1 Answers

0
votes

Check out the promoted-builds project from Git, and add the following line inside Promotion.java's build method:

Promotion.this.getActions().add(Promotion.this.getTarget().getAction(SubversionTagAction.class));

This will take the SubversionTagAction instance that the Parameterized Build Trigger will use to specify an SVN URL and SVN Revision.

Environment variables are a massive red herring here - they don't make a jot of difference, it's all about the Action instances that get passed.