On Thu, 9 Mar 2017, at 13:23, Dirk Heinrichs wrote:
> Hi,
> 
> I've got a job that runs a Groovy script which should pull from a
> Mercurial repo, merge a given branch and then serve the result to sub
> jobs running in a multijob phase to perform builds on different OS's.
> For this to achieve, the script should spawn a "hg serve" process into
> the background. Once the Multijob phases have finished, another script
> should then kill that process again.
> 
> That works fine as long as I execute the Groovy script standalone (the
> script finishes and the background process keeps running). But if
> executed from Jenkins, the "hg serve" process is killed when the script
> finishes, which is of course not what I want.
> 
> How can I spawn a background process from a Groovy script in Jenkins so
> that it's still running when the script ends?

Sounds like
https://wiki.jenkins-ci.org/display/JENKINS/Spawning+processes+from+build

-- 
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/1489200300.4088274.907659200.1FBE77A9%40webmail.messagingengine.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to