Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-17279

I need better documentation for how to use the SVN parameter

XMLWordPrintable

      I have conveyed my confusion in this stack overflow post: http://stackoverflow.com/questions/15510754/jenkins-how-do-i-use-the-parameterized-trigger-plugin-and-pass-a-subversion-rev

      I'll inline it for convenience:

      IMO, this use case really needs to be specifically spelled out on the plugin's webpage/documentation.

      Let's say I have a project named U for upstream and D for downstream. When U finishes building, I want D to checkout the same revision that U just built and build itself. U will always checkout HEAD.

      Here's what I've done:

      1. In U, I added a "Post-build Actions" for "Trigger parameterized build on other projects".
      1. For "Projects to build" I typed in D and to only build when "Stable".
      1. I added a trigger for "Subversion revision".
      1. I saved this configuration

      Now I don't know what I'm supposed to do next, but I get no feedback to indicate this is working. In fact, [even this testcase that's committed to the plugin source][1] suggests this is all I should have to do.

      But, if I were to guess, I'd think I'm supposed to mark U as a parameterized build and add a parameter to it. This parameter should be named what U sends to D. But, if I've got the right idea, I don't know what I'm supposed to name this parameter. Neither the console log of D nor the console log of U mentions any new parameter.

      I took a guess and created a String parameter in U named "SVN_REVISION" and defaulted it to -1, but that had no effect. Every time D triggers a build, SVN_REVISION is defaulted to -1.

      Let me ask a question that I'll probably need to ask next. Once I know the name of the parameter I need to use, how do I modify the configuration of U so that it checks out that revision? Do I modify the "Repository URL" to put a `@${PARAMETER_NAME}` at the end or something?

      [1]: https://github.com/jenkinsci/parameterized-trigger-plugin/blob/master/src/test/java/hudson/plugins/parameterizedtrigger/test/SubversionRevisionBuildTriggerConfigTest.java

            huybrechts huybrechts
            dank Daniel Kaplan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: