Passing parameters to a downstream maven job?

331 views
Skip to first unread message

Edbras

unread,
Jan 10, 2012, 4:05:11 AM1/10/12
to jenkins...@googlegroups.com

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?

- Ed

Edbras

unread,
Jan 12, 2012, 5:04:59 AM1/12/12
to jenkins...@googlegroups.com
Please some advice on this issue as I am a bit stuck with it.
If my question isn't clear, let me know and I will try to improve it.

Brian Parker

unread,
Jan 12, 2012, 8:01:02 AM1/12/12
to jenkins...@googlegroups.com
In your case, I don't think you will be able to use the PT plugin to
pass parameters. The reason is you aren't using the PT plugin to
trigger the downstream job. Instead, it sounds like they are
triggered through the "whenever -SNAPSHOT dependency" mechanism. What
parameters exactly do you want to pass? Maybe there is another way to
solve this.

Cheers,

Brian

Ed Bras

unread,
Jan 12, 2012, 8:18:34 AM1/12/12
to jenkins...@googlegroups.com
Thanks Brian,
I have a parent maven project that is a job that triggers about 10 other maven jobs through "snapshot dependency" build mechanism.
I have a job that triggers the parent job to be triggered every 2 hours (between 10:00 - 17:00)

Once a night I want to trigger to perform the same build (building all maven jobs: parent and childs) but then including the tests, pmd, checkstyle etc... 

I don't know how this best can be done :(

My idea (from the mailing list): define the maven goals for all jobs something like this: clean install
Then specify a jvm option: -Dpmd.phase and pass the parameter "pmd.phase" as "none" or "verify". But I don't seem to pass the "pmd.phase" parameter.
Btw: the "pmd.phase" corresponds to a maven property linked to the pmd plugin.

Alternative: creating one big job that corresponds to s super GIT repo with submodules. But neither does that work very well (played with it) as updating super projects requires some extra pre-build scripting as GIT submodules are "strange" :( 

I could also define the downstream projects myself (such that I can pass the parameter) but then I am duplicating the dependency information contained in the pom.xml which fragil due to changes that can occur and Jenkins is doing an excellent job determine them automatically due the the "snapshot dependency" mechanism.

Any advice is more then welcome?

Edbras

unread,
Jan 16, 2012, 4:15:56 AM1/16/12
to jenkins...@googlegroups.com
Can you please advice me on solving my problem description above?
- Ed

Clayton Neff

unread,
Jun 26, 2015, 4:31:43 PM6/26/15
to jenkins...@googlegroups.com
Ed -


Can you please advice me on solving my problem description above?
I am having the exact same issue over three years later. Did you ever come up with a solution?

Thanks.

-- Clayton --

post2...@gmail.com

unread,
Jun 27, 2015, 2:47:33 AM6/27/15
to jenkins...@googlegroups.com
I didn't, just made one big jenkins job

Verstuurd vanaf mijn mobie
--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/FYEwkbH1Zkk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/6f30b51f-4594-4532-8cef-bf7aeceec84c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages