I think JENKINS-26052 <https://issues.jenkins-ci.org/browse/JENKINS-26052>
would be a natural solution for this. parallel() has a different emphasis
from yours.

I also thought about building a library on top of workflow that lets you
declare tasks with dependencies and have the library figure out what to
execute in what order (including parallelism), which might work well for
this, too. The idea is something like the following:

task(name:"foo") {
  // whatever computation you fancy
  sh '...'
}

task(name:"bar", depends:["foo"]) {
  ...
}

task(name:"zot", depends:["foo"]) {
  ...
}

attain "zot"  // foo runs, then bar+zot runs in parallel


2014-12-14 18:26 GMT-08:00 Alexander Bertram <a...@bedatadriven.com>:
>
> I'm experimenting with the moving some hacky build proccesses into the
> great new workflow plugin, but not sure how to best handle dependencies
> between parallel steps.
>
> The workflow is meant to test a release candidate of an R-language
> interpreter against a library of a few thousand packages, some of which
> depend on each other.
>
> ideally my flow would look like this:
>
> def packages = fetchPackageIds()
> builds = [:]
> for p in packages {
>   builds[p] = {
>      waitFor dependencyPackageIds(p)
>      node { buildPackage p }
>   }
> }
> parallel builds
>
> But it looks like I need to implement a waitFor primitive that is similar
> to stage but local to the flow rather than global?
>
> Or is there another approach I'm missing?
>
> Thanks,
> Alex
>
>
>
> --
> 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/ba1047d2-c7bd-4b9b-9f78-463573e99877%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Kohsuke Kawaguchi

-- 
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/CAN4CQ4zqi2aMNutgKp-5B2ErVWiE%2BfUUXguDXkigsS32k1k7WA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to