简体   繁体   中英

Passing parameters to a downstream maven job?

With the Jenkins plugin "Parameterized Trigger Plugin" you can pass job parameters to a downstream job. You have to specify the downstream job which I don't know in my case.

In am using all maven jobs with the setting "Build whenever a SNAPSHOT dependency is built" enabled such that the downstream jobs are automatically detected and run by Jenkins it self. A such, I don't know the downstream job such that I can't specify it when using the "Parameterized Trigger Plugin". How can I pass all parameters value's to all the detected jenkins maven jobs?

Sorry, but I have to disappoint you. There is no way to add parameters to the Build whenever a SNAPSHOT dependency is built . There is a little manual work to do to "add this functionality":

  • Go to the triggered Job with parameter
  • Go to each Upstream-Job and add a post build action: Trigger parameterized build on other projects

Its not the ideal solution. But the plugin doesn't support this use case.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM