Hi Joshua,
You need to use the parallel function as shown below:

// Build flow
parallel (
  {
    build("Parallel_job_1")
    parallel (
      { ignore(FAILURE) { build("Post_build_job") } },
      { build("Package_job") }
    )
  },
  {
    build("Parallel_job_2")
    parallel (
      { ignore(FAILURE) { build("Post_build_job") } },
      { build("Package_job") }
    )
  }
)
build("Combiner_job")
>From the example above, Parallel_job_1 and Parallel_job_2 run at the same 
time.
Once Parallel_job_1 completes, Post_build_job and Package_job run in 
parallel.
When Parallel_job_2 completes, Post_build_job and Package_job are also run 
in parallel.
Failure of Post_build_job is ignored so it doesn't fail the build.
And once all jobs are completed, the Combiner_job is run (which uses the 
output from both Parallel_job_1 and Parallel_job_2).
This is kind of advanced using nested parallel builds, however its what I 
needed for my solution, so hopefully it helps.
You can also remove the nested parallel Post_build_job and Package_job for 
a simpler solution.
When a job is triggered it appears as a normal job in the queue so you can 
see its progress and logs like any other job.
 
Good Luck,
Josh

On Saturday, November 9, 2013 10:29:41 AM UTC+11, Josh H wrote:

>  Currently we trigger projects by using build("name of project");.. etc. 
> This blocks the build flow until the build is finished.
>
> Is there a way to trigger a project that is nonblocking, and then 
> immediately execute other groovy tasks afterwards?
>
> ie:
> build1 = nonblockingbuild("foo");
> print "whatever";
> //do other stuff
>
> As a bonus, can we check on build1's status while it's running?
>  
> -- 
> Joshua Ho
>

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to