Parameterized Trigger Plugin

Plugin Information

Plugin ID parameterized-trigger
Latest Release 2.4
Latest Release Date Jul 29, 2010
Changes via Fisheye In Latest Release
Since Latest Release
Maintainer(s) Tom Huybrechts (id: huybrechts)
Issue Tracking Open Issues

This plugin lets you trigger new builds when your build has completed, with various ways of specifying parameters for the new build.
You can add multiple configurations: each has a list of projects to trigger, a condition for when to trigger them (based on the result of the current build), and a parameters section.
The parameters section can contain a combination of one or more of the following:

  • a set of predefined properties
  • properties from a properties file read from the workspace of the triggering build
  • the parameters of the current build
  • "Subversion revision": makes sure the triggered projects are built with the same revision(s) of the triggering build. You still have to make sure those projects are actually configured to checkout the right Subversion URLs.

The parameter section is itself pluggable, and other plugins can contribute other sources of parameters.

Please submit bugs and feature requests to the issue tracker and not (only) in the comments.

Changelog

2.4 (Jul 29, 2010)

  • Fix passing of parameters when a maven project is the upstream job. (issue #6141)
  • Add support for multiconfiguration(matrix) projects. (issue #5687)
  • Fix variable expansion in "predefined parameters" so backslashes in variable values are not lost. Add help text about backslash handling. (issue #6004)
  • File parameters are currently not reusable, so omit these when "current build parameters" is selected. (issue #6777)
  • Update trigger settings when other jobs are renamed or deleted. (issue #6483)
  • Add an "always trigger" option. (issue #6656)

2.3 (Jan 16, 2010)

  • NOTE: This release is built against Hudson 1.341 but works with Hudson 1.319 or higher.
  • Implement Hudson API so connected jobs show in Upstream/Downstream Projects list on job pages with Hudson 1.341 or higher. (issue #5184)
  • Merge together parameter lists from multiple sources to avoid multiple Parameters links on build pages (issue #5143) and failure to pass some parameters further along the downstream chain (issue #4587).

2.2 (Jan 11, 2010)

2.1 (Jan 9, 2010)

  • Implement Hudson API so connected jobs show in Upstream/Downstream Projects list on job pages. (issue #5184)

2.0 (Aug 10, 2009)

Major refactoring. Now supports any combination of projects to build, result condition and set of parameter sources.

Should be backward compatible for configuration, except the 'batch condition' which was removed.

1.6 (Jul 18, 2009)

  • Removed downstream projects parameters duplication.

1.5 (Jul 5, 2009)

  • Added batch condition: a batch/shell script can be used to decide if project[s] built should be triggered.
  • If downstream project parameters values are not specified explicitly their default values are used now (empty values was used in previous versions).

1.4 (Jun 11, 2009)

  • Environment variables (including current build parameters) can now be used in the downstream build parameters and in parameters file name.

1.3 (Feb 28, 2009)

  • Trigger another build when the current is unstable

1.2 (Feb 27, 2009)

  • Fixes incompatiblity with Hudson 1.285. Hudson 1.286 is a minimum requirement for this version.

1.0, 1.1 (Feb 9, 2009)

  • Initial release

Labels:

plugin-trigger plugin-trigger Delete
plugin-post-build plugin-post-build Delete
Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.
  1. Jun 01, 2009

    Maxim Ilinykh says:

    Is it possible to use current build parameters to form parameters of downstream ...

    Is it possible to use current build parameters to form parameters of downstream build?

    For example, to send build number to downstream project one may write:

    SOURCE_BUILD_NUMBER=${BUILD_NUMBER}
    
    1. Jun 11, 2009

      Maxim Ilinykh says:

      Implemented.

      Implemented.

  2. Jun 30, 2009

    Joe Stano says:

    How about using the parameters passed by this plugin in an SVN URL?  I know...

    How about using the parameters passed by this plugin in an SVN URL?  I know this is possible with a parameter on the job itself, but it doesn't seem to work when the job is invoked by this plugin.

    For example: job 2 has a parameterized SVN URL

        http://hudson_host/repo/tags/${tagNumber}
    

    and job 1 is pulling the 'tagNumber' property from a properties file and invoking job 2 via this plugin.  The parameter does not get resolved, so the build fails.

    1. Jul 01, 2009

      Maxim Ilinykh says:

      I've tested this out today with latest versions of Hudson and Parameterized Trig...

      I've tested this out today with latest versions of Hudson and Parameterized Trigger Plug-in. Everything seems to be working as expected (I've managed to use parameter that have been passed from upstream project in SVN URL). Can you give more details?

  3. Jul 13, 2009

    Gustaf Lundh says:

    Great plugin! There is a few things I cannot get working though. Hopefully ...

    Great plugin!

    There is a few things I cannot get working though. Hopefully you can help me (or at least give me a hint on how to continue).

    I'm using the comment-function since someone else maybe can benefit from the answer.

    When I'm using this plugin instead of the default "Build other projects"-functionality, a couple of the standard features stops working or goes missing.

    For instance, the connection between the downstream and upstream job is somewhat "lost". E.g. on the project page, the "Downstream Projects"/"Upstream Projects"-section goes missing. This makes it very hard for the users to find the triggered jobs.

    Even worse, the downstream test results cannot be aggregated between jobs.

    Have I maybe missed some settings/functionality? Is it an implementation decision? Or is it a bug?

    Best regards

    Gustaf

    1. Jul 18, 2009

      Maxim Ilinykh says:

      It seems that "Downstream Projects" and "Upstream Projects" sections are built-i...

      It seems that "Downstream Projects" and "Upstream Projects" sections are built-in ones. It may be possible to add their support to Parameterized Trigger (I'm not sure though), but it's not really an issue.

      Test results aggregation is quite different one. I'll try to do something about it as soon as I get some free time.

      Best regards,
      Maxim

  4. Aug 10, 2009

    Maxim Ilinykh says:

    Was there any specific reason for removing batch condition? It was really useful...

    Was there any specific reason for removing batch condition? It was really useful. Can you suggest another way for conditional project building in Hudson?

    1. Aug 13, 2009

      Sven Kirmess says:

      I absolutely need the batch conditions. The batch conditions are used to make it...

      I absolutely need the batch conditions. The batch conditions are used to make it possible to chain multiple projects together and use the same projects in between. A variable is used to identify which "chain" is used.

      Please, please, please add them back.

      1. Aug 28, 2009

        Sven Kirmess says:

        Any chance you might reconsider the removal of the batch conditions? Please?

        Any chance you might reconsider the removal of the batch conditions? Please?

        1. Sep 12, 2009

          Olivier Armand says:

          I also really need this feature, there's currently no other way to implement con...

          I also really need this feature, there's currently no other way to implement conditional chaining in Hudson.

          1. Oct 21, 2009

            Shaohua Wen says:

            Yes, this batch conditions is really useful, please consider add it back. BTW, ...

            Yes, this batch conditions is really useful, please consider add it back.

            BTW, any document about how to contribute to the parameter section?

  5. Sep 16, 2009

    Andrey says:

    Is it possible to run parameterized build remotely from the script ? I was try...

    Is it possible to run parameterized build remotely from the script ? I was trying to use "Trigger builds remotely" but I can not find a way to specify parameters in URL

    Also If I have 2 Build triggers, currently they executed in parallel .Can option to control order
    of trigger execution be added to "Trigger when build is " list ?

  6. Sep 25, 2009

    György Földvári says:

    It seems, that actual triggering is blocked, if there are no parameters given, e...

    It seems, that actual triggering is blocked, if there are no parameters given, e.g. the parameter file is missing. Is this intentional? Can I use it as a kind of conditional triggering? Or It is a bug therefore I cannot rely on it?

  7. Dec 10, 2009

    Max Khon says:

    For multiconfiguration project the build is triggered for each configuration, un...

    For multiconfiguration project the build is triggered for each configuration, unlike "Build other projects" when downstream project is built once for multiconfig project.

    Can this be made either configurable or made to be run once per project, not per configuration?

  8. Dec 16, 2009

    Shimi says:

    How can I use the "Subversion revision" in the triggered project?

    How can I use the "Subversion revision" in the triggered project?

  9. Dec 21, 2009

    venkatasatyanarayana says:

    I have configured 2 jobs A and B, A should call B on success with parameters. U...

    I have configured 2 jobs A and B, A should call B on success with parameters.

    Using this plugin, i have selected option of "Use properties from file" and supplied a properties file "temp.properties", with key=value pairs, one per line in that file.

    Unfortunately, Job A on success is not triggering Job B throwing an error in the log error file as below:

    <snip>

    INFO: A #1029 main build action completed: SUCCESS
    Dec 21, 2009 10:28:15 AM hudson.model.Executor run
    SEVERE: Executor throw an exception unexpectedly
    java.lang.NoSuchMethodError: java.util.Properties.load(Ljava/io/Reader;)V
        at hudson.plugins.parameterizedtrigger.FileBuildParameters.getAction(FileBuildParameters.java:54)
        at hudson.plugins.parameterizedtrigger.BuildTriggerConfig.perform(BuildTriggerConfig.java:75)
        at hudson.plugins.parameterizedtrigger.BuildTrigger.perform(BuildTrigger.java:49)
        at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
        at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:583)
        at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:564)
        at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:551)
        at hudson.model.Build$RunnerImpl.cleanUp(Build.java:158)
        at hudson.model.Run.run(Run.java:1221)
        at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
        at hudson.model.ResourceController.execute(ResourceController.java:88)
        at hudson.model.Executor.run(Executor.java:122)

    </snip>

    Can some one help me on this.... Its a bit urgent for me.

  10. Feb 04

    Mark Wolff says:

    I use the SVN revision option.  It works very nicely.  Is there a way...

    I use the SVN revision option.  It works very nicely. 

    Is there a way to pass "svn revert" and/or "svn update" options?  I want to do "non-update" checkouts occasionally.

    Thank you.

    1. Mar 25

      Michael Legner says:

      How did you get it working? I kinda stuck with it, Hudson can't check out from m...

      How did you get it working? I kinda stuck with it, Hudson can't check out from my repostitory:

      Checking out https://subversion/path/to/branch @${SVN_REVISION}
      ERROR: Failed to check out https://subversion/path/to/branch @${SVN_REVISION}
      org.tmatesoft.svn.core.SVNException: svn: URL 'https://subversion/path/to/branch%20@$%7BSVN_REVISION%7D' doesn't exist
      

      i've also tried @$SVN_REVISION and @%SVN_REVISION%, but the same error occurred. If I put a number at the place instead, it works.

      1. Apr 06

        Mark Wolff says:

        You are working too hard.  It appears that as long as the master job is set...

        You are working too hard.  It appears that as long as the master job is set up to pass the built-in subversion revision, the sub-job uses the revision number without you using $ this or % that.  

        1. Apr 07

          Michael Legner says:

          unfortunatly, it doesn't, at least not at my installation. I've already put the ...

          unfortunatly, it doesn't, at least not at my installation. I've already put the problem to the mailing list, but without any answer so far:

          http://n4.nabble.com/Use-same-SVN-Revision-for-alle-downstream-builds-td1746469.html#a1746469

  11. Feb 22

    Jason Stiefel says:

    Great plugin! But we are in serious need of support for triggering a build a...

    Great plugin! But we are in serious need of support for triggering a build after the flyweight (parent) of a multi-configuration build completes. Currently nothing happens in this scenario.

    thanks!

  12. Apr 06

    Mark Wolff says:

    I've had trouble using variables with periods or underscores in them on Linux jo...

    I've had trouble using variables with periods or underscores in them on Linux jobs called by Windows master jobs.  If I remove those special characters, everything works fine. Also, on Windows, environment variables names are often upper cased for you.  So using exclusively upper case in env var names saves a lot of headaches.

  13. Mar 25

    massimo tedesco says:

    I would like to use this plugin to build project A, project C and project B in t...

    I would like to use this plugin to build project A, project C and project B in this sequence, but Hudson will build project A, project B and project C (alphabetical order).

    Doing something wrong? Thanks

  14. May 21

    Micke says:

    Can anyone answer this? http://hudson.361315.n4.nabble.com/Trigger-parameterize...