Hi Michael

This is a freestyle job and yes, I am triggering the job to run.

I tried your solution to add post build action to trigger job B after job A
is triggered through the api and it works.

But my use case is to trigger job B not immediately but at any given time.

So as of now whenever I trigger job B using /job/JobB/build api job B
successfully runs , but I can't see it on the UI pipeline view of jenkins ,
the way you see it in the pipeline view when you trigger from the UI
On Jan 31, 2016 7:10 PM, "Michael Neale" <mne...@cloudbees.com> wrote:

> Ramnath, some questions:
>
> 1) what type of job - freestyle, workflow/pipeline or something else?
> 2) when you say "trigger a deploy job remotely" - do you mean create the
> job? or just trigger it to run ?
>
> Normally what people do is check "Build after other projects are built"
> on JobB config (in the "Build Triggers" section) - and put JobA in there.
> Then, any time JobA completes, JobB will run.
>
> Alternatively, in JobA you could put a post build action to trigger JobB.
>
> Then, from an api, you only ever need to trigger JobA and JobB will
> follow.
>
> Otherwise, I don't know what you mean by "linked to the pipeline or not".
>
>
>
>
>
> On Saturday, January 30, 2016 at 10:50:06 AM UTC+11, Ramnath Ananth wrote:
>>
>> My question is the same as this discussion
>>
>> https://groups.google.com/d/topic/jenkinsci-users/wbggN5aBHgU/discussion
>>
>> Hope this helps
>>
>> Thanks
>> Ramnath
>> On Friday, January 29, 2016 at 2:27:53 PM UTC-8, Ramnath Ananth wrote:
>>>
>>> Hi Jason.
>>>
>>> I have used the mentioned build with parameters option and it works
>>> through REST api. But the build result is not getting reflected in the
>>> Build pipeline view. It is still in its original pipeline color and the
>>> builds are not getting promoted further.
>>>
>>> Thanks
>>> Ramnath
>>>
>>>
>>>
>>> On Friday, January 29, 2016 at 1:35:47 PM UTC-8, Jason Tran wrote:
>>>>
>>>> Maybe this will help:
>>>>
>>>> https://wiki.jenkins-ci.org/display/JENKINS/Parameterized+Build
>>>>
>>>> Look at 'Launching a build with parameters'
>>>>
>>>> http://server/job/myjob/buildWithParameters?PARAMETER=Value
>>>>
>>>>
>>>>
>>>> On Friday, January 29, 2016 at 10:36:43 AM UTC-8, Ramnath Ananth wrote:
>>>>>
>>>>> Hello,
>>>>>
>>>>> I am trying to trigger a deploy job remotely using REST api and so far
>>>>> I couldn't find any api which would know if the job is linked to the
>>>>> pipeline or not.
>>>>>
>>>>> I want to trigger a build job A. After successful completion of job A
>>>>> , I want to trigger deploy job B. But there is no api to link the two jobs
>>>>> although I can directly trigger job B successfully.
>>>>>
>>>>> Please can anyone help me on this.
>>>>>
>>>>> Thanks
>>>>> Ramnath
>>>>>
>>>>> Discussion link from dev group :
>>>>> https://groups.google.com/d/topic/jenkinsci-dev/ucokqMfMQnA/discussion
>>>>>
>>>>>
>>>>> --
> 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/vRD9NG03dYE/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/24045c04-9b9c-4c2d-b084-b9d7bde66925%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/24045c04-9b9c-4c2d-b084-b9d7bde66925%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CANejj1XBO36EoRA%3Dohq%3DB%2BxmPuSZePk_DN4i6gFC7F%3DSnaWnvg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to