Thanks Brian,
yes i use Parameterized trigger plugin. But if i use "projects to build"
field, then i cannot condition the downstream job right? I got a answer to
my query from OSUBeavBane as below
So, you can launch jobs programatically within another job. So within
> your job just set up an if(x=1) launch J2; if(x=2) launch J3;
> For more info on how to programatically launch a job go to
> "{JENKINS_URL}/job/{JOB_NAME}/api".
Above will work for me. But i have the following query now.
>
> I found this below in "{JENKINS_URL}/job/{JOB_NAME}/api".
> Perform a build
> To programmatically schedule a new build, post to* this URL.* If the
> build has parameters, post to *this URL* and provide the parameters as
> form data.
> So i know now that now if i give that url in browser it will trigger the
> job. But in my job how to invoke it? Does it work if i just give the link
> address from above?
> Second question is that if it is parameterised build then they said to
> provide parameter as form data. what is form data and how to do it?
Thanks,
Arun
On Thursday, 31 May 2012 16:10:53 UTC+5:30, BrianParker wrote:
>
> If you are using the Parameterized Trigger plugin, the "projects to build"
> field can be a build environment variable. So, if you can inject the
> downstream job name into the build environment, you can trigger it.
>
> Cheers,
>
> Brian
>
>
> On Wed, May 30, 2012 at 1:03 AM, Arun Kumar <[email protected]> wrote:
>
>> Hi,
>>
>> I have a requirement to trigger a job depending upon the input parameter.
>> Lets say i have job J1,j2,J3 and J4
>>
>> The J1 executes and depending upon the input parameter x on job J1 it
>> should trigger either J2 or J3. If the x is 1 it should trigger J2 and
>> if the x is 2 it should trigger J3.
>>
>> some what like below flow chart
>>
>> J1
>> x=1 / \ x=2
>> / \
>> J2 J3
>>
>> Thanks in advance.,
>> Arun
>>
>
>