To run one or other of the downstream jobs, it currently not a simple case 
as, but there are are several different ways of doing it.

Use a groovy post build script to trigger one of the builds

You could use the Parametrized trigger [1] in combination with the 
conditional build step plugin,[2] to run the jobs as build steps within a 
job.

This would mean having a conditional buildstep for each of the platforms, 
where the  environment variable is checked
which contains the trigger build on other projects for the correct project.


If you want to use the conditional part with the Parametrized trigger as a 
trigger for the downstream properly there is a pull request for that on 
github,
that you can build and test. [3]

Chris

[1]  
https://wiki.jenkins-ci.org/display/JENKINS/Parameterized+Trigger+Plugin 
[2]  
https://wiki.jenkins-ci.org/display/JENKINS/Conditional+BuildStep+Plugin 
[3]  https://github.com/jenkinsci/parameterized-trigger-plugin/pull/17 

On Monday, September 3, 2012 10:54:45 AM UTC+1, bandy wrote:
>
> Hi,
>
> I am new in Jenkins and wandering for few days to get my head around the 
> topic "How to trigger downstream job based on certain conditions ?"
>
> Details:
>
> I have testlink integrated with jenkins which manages the test suite and 
> test cases. I have a custom field "Test Client Platform Type" in TestLink. 
> The tester can specify in the TestLink if the test case has to be run in 
> Windows or Linux Platform.
> I fetch the custom field in jenkins successfully but can't figure out how 
> to trigger downstream jobs in linux and windows client depending on the 
> environment variable.
>
> Any ideas ??
>
>
>

Reply via email to