Hi Dan,
I think the failure to trigger a downstream job with parameters is due
to a Jenkins bug: https://issues.jenkins-ci.org/browse/JENKINS-10342. So
you are on the right track to work around it.
Cheers,
Eric
On 5/14/2013 2:27 PM, Dan Tenenbaum wrote:
On Tuesday, May 14, 2013 10:09:23 AM UTC-7, Dan Tenenbaum wrote:
Hi,
I'm using the Parameterized Trigger plugin. I have a
multi-configuration project (project A) which has a post-build
action to "Trigger parameterized build on other projects",
configured to run another multi-configuration project (project B)
when the build is stable, and pass B the current build parameters
from A.
The problem is that the trigger does not seem to work. Project B
never runs even though project A builds successfully. In fact even
if I change the configuration on A to trigger B when the build is
"Complete (always trigger)", it still does not trigger B.
What am I doing wrong?
If I check the "Trigger build without parameters" box, project B is
indeed run.
However, project B (which is currently just a shell script that prints
out the current environment with 'env') does not display any of the
build parameters from project A.
I don't understand what the "Trigger build without parameters"
checkbox is. The whole reason I am running the Parameterized Trigger
plugin is to be able to pass A's build parameters to B. If I look at
the console output of B, I see
originally caused by:
Started by upstream project "A" build number 50
All I really need is that "A" (in other words, the name of the project
that triggered B) but I'm not sure how to get it programmatically.
I should mention that A is not a parameterized project in that it does
not take any special parameters. The parameters I want to pass to B
are just the ordinary ones that Jenkins sets, like JOB_NAME and so forth.
OK, it looks like maybe what I want to do is write a properties file
in project A and pass that to project B with the "Parameters from
properties file" option. But that doesn't seem to work. I can verify
in project A that the properties file is written out and has the
correct contents, but in project B I echo out the parameters I'm
trying to pass and they are not defined.
One clue is that if I check the "Don't trigger if any files are
missing" box, project B does not run. This tells me that Jenkins
*thinks* that there is no such properties file in my workspace, but
there is. In the top level of the workspace I have a file called
job.properties and I've put 'job.properties' (without the quotes) in
the "Use properties from file" box.
However, it works if I use "Predefined parameters" like this:
PREV_WORKSPACE=$WORKSPACE
So I guess my question is answered.
Thanks,
Dan
Thanks,
Dan
--
You received this message because you are subscribed to the Google
Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "Jenkins
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.