RE: start jenkins sub jobs parallelly
I tried the below code, but that doesn't ensure the parallel run. #!groovy stage "preparation" node { parallel ( phase1: { echo "phase1" }, phase2: { echo "phase2" } ) } stage "do the build" parallel ( "stream 1" : { node { def now = new Date() def timestampNow = now.toTimestamp() println "Start: ${timestampNow} [${timestampNow.class}]" echo "hstream1" } }, "stream 2" : { node { def now = new Date() def timestampNow = now.toTimestamp() println "Start: ${timestampNow} [${timestampNow.class}]" echo "hashtag fail" } } ) -- View this message in context: http://jenkins-ci.361315.n4.nabble.com/start-jenkins-sub-jobs-parallelly-tp4827908p4828292.html Sent from the Jenkins users mailing list archive at Nabble.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 jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/1468836876097-4828292.post%40n4.nabble.com. For more options, visit https://groups.google.com/d/optout.
Re: start jenkins sub jobs parallelly
There are a couple different ways I would do this but the simplest would be to have a single job that triggers automatically whose primary function is to trigger all the jobs you want running in parallel as downstream of itself. Another way would be to have this "trigger" job make use of the MultiJob Plugin, in which case you can pretty easily stage the execution of multiple sets of parallel jobs. The advantage of this plugin, even if you don't want to separate your parallel job runs into multiple stages is that the success of the job doing the triggering can depend on the success of the triggered jobs, so you have one job's status to check for overall success/failure. However, I am still learning about the Pipeline (aka Workflow) Plugin and there may very well be a better way to express the parallel behavior you are looking for using it. The misleadingly-named "parallel" keyword is probably not it though... Here's an example of how it works: https://github.com/jenkinsci/pipeline-examples/blob/master/pipeline-examples/parallel-from-list/parallelFromList.groovy#L27 You might be able to use this in combination with the pipeline-build-step step: https://jenkins.io/doc/pipeline/steps/pipeline-build-step/#build-build-a-job On Friday, July 15, 2016 at 9:19:50 AM UTC-7, Pedda Reddy wrote: > > I have 'n' no. of jobs, which I want to start simultaneously. Is it > feasible > in Jenkins? I tried using DSL plugin, work flow plugin. I have used > 'parallel' method. I have my list of jobnames in an array/list and want to > run them parallel. Please help. > > Currently I'm iterating the jobnames in a for loop,they start one by one, > instead I want them to start parallel. How this can be achieved ? > > > > > -- > View this message in context: > http://jenkins-ci.361315.n4.nabble.com/start-jenkins-sub-jobs-parallelly-tp4827908.html > > Sent from the Jenkins users mailing list archive at Nabble.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 jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/85e4d9e2-7d87-484f-be61-c691f44f0683%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
RE: start jenkins sub jobs parallelly
If you actually want them to start at the same moment (roughly), and they are all separate jobs, check Build Periodically and enter exactly the same time. e.g. 10 10 * * * this says run at 10:10 AM every day -Original Message- From: jenkinsci-users@googlegroups.com [mailto:jenkinsci-users@googlegroups.com] On Behalf Of pb60704 Sent: Friday, July 15, 2016 4:39 AM To: jenkinsci-users@googlegroups.com Subject: start jenkins sub jobs parallelly I have 'n' no. of jobs, which I want to start simultaneously. Is it feasible in Jenkins? I tried using DSL plugin, work flow plugin. I have used 'parallel' method. I have my list of jobnames in an array/list and want to run them parallel. Please help. Currently I'm iterating the jobnames in a for loop,they start one by one, instead I want them to start parallel. How this can be achieved ? -- View this message in context: https://urldefense.proofpoint.com/v2/url?u=http-3A__jenkins-2Dci.361315.n4.nabble.com_start-2Djenkins-2Dsub-2Djobs-2Dparallelly-2Dtp4827908.html=CwIBaQ=3mGIBQKb1eS1YDHb7ax3kFkT2UAGBJ12p2lcECIjhXk=SXz9subj7EUWDFIuiAjJSXBLM9pAzGIduhHWvfq5re0=emlwH7z__pPgl-6w-cQMYspM25h6FZ8B-7IhpJU3sb0=-DZJHt8jzKvGYjAeL3WaaVrUblrS-m48-j2XDBiT9fw= Sent from the Jenkins users mailing list archive at Nabble.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 jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_msgid_jenkinsci-2Dusers_1468571936370-2D4827908.post-2540n4.nabble.com=CwIBaQ=3mGIBQKb1eS1YDHb7ax3kFkT2UAGBJ12p2lcECIjhXk=SXz9subj7EUWDFIuiAjJSXBLM9pAzGIduhHWvfq5re0=emlwH7z__pPgl-6w-cQMYspM25h6FZ8B-7IhpJU3sb0=_XwcrRgONx0shJfThf7AnFDTz6YtpjzJaR_4U43UPqw= . For more options, visit https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_optout=CwIBaQ=3mGIBQKb1eS1YDHb7ax3kFkT2UAGBJ12p2lcECIjhXk=SXz9subj7EUWDFIuiAjJSXBLM9pAzGIduhHWvfq5re0=emlwH7z__pPgl-6w-cQMYspM25h6FZ8B-7IhpJU3sb0=wcoK1D40nss5eqWvT8-A8zJDSLsigV6LrLdXh5UwjtQ= . -- 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/6C6EE445A6F6CE4E8A0FFB51B071A4E2D8726216%40AMERMBX02.PERKINELMER.NET. For more options, visit https://groups.google.com/d/optout.