We accomplish this by polling within an imperative pipeline script. It isn't 
all that complicated. The downside is that completion of the Jenkins script now 
becomes less deterministic so we have wound up with the Jenkins build hanging 
(and blocking downstream builds) as a result of problems in the external 
mechanism. But I guess you get what you ask for.

From: [email protected]<mailto:[email protected]> 
<[email protected]<mailto:[email protected]>> On 
Behalf Of [email protected]<mailto:[email protected]>
Sent: Monday, August 27, 2018 1:58 AM
To: Jenkins Users 
<[email protected]<mailto:[email protected]>>
Subject: Jenkins plugin for invoking external async jobs and polling their 
results

________________________________
NOTICE: This email was received from an EXTERNAL sender
________________________________

I might not have done enough research but so far I wasn't able to find too many 
Jenkins plugins or instructions that would handle this kind of scenario:

- At the beginning of a Jenkins job, trigger a webhook on an external service, 
possibly getting back some kind of (non-Jenkins) job ID
- Wait until the external job is finished (polling the service or subscribing 
to events), fetch the results using the API of that external service
- Finish the job and set its status based on the external job results

The issue is that the job running on an external platform cannot be run as part 
of the build on Jenkins slaves but it still needs to be part of a long, complex 
chain of Jenkins jobs. Thus, Jenkins is just used as a way to trigger the 
external job and publish its results.

Some plugins that I stumbled upon:
- 
https://github.com/jenkinsci/coverity-plugin/<https://github.com/jenkinsci/coverity-plugin/>
 - the Coverity Connect related parts could be vaguely similar but it seems to 
be quite a complex plugin to even just copy the basic ideas from
- 
https://plugins.jenkins.io/external-monitor-job<https://plugins.jenkins.io/external-monitor-job>
 - the name sounds promising but I think, in my case, it ends there

What I'm looking after is:
- suggestions of plugins that already do something like this (which I can 
either fork or just take ideas from)
- alternatively, is there already a better way of achieving the same thing with 
Jenkins and I just didn't realize it yet?

Thanks a lot!
--
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 
[email protected]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/71b2211f-ff3d-4fa1-8a49-e555ee6397cf%40googlegroups.com<https://groups.google.com/d/msgid/jenkinsci-users/71b2211f-ff3d-4fa1-8a49-e555ee6397cf%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit 
https://groups.google.com/d/optout<https://groups.google.com/d/optout>.


Steven Gardell
Director of Application Security and DevOps
4  Technology Park Drive | Westford, MA 01886 USA
office: +1.978.614.8831
[GENBAND.com]
<https://ribboncommunications.com/>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/BN6PR03MB2803AC1186B23A5435A1A7F2AF030%40BN6PR03MB2803.namprd03.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to