On Thu, Feb 26, 2015 at 9:10 AM, Jesse Glick <
jgl...@cloudbees.com> wrote:
>
> But perhaps you meant the Build Flow DSL, which is quite different—a common
> source of confusion! This was actually the main “prior art” we considered
> while designing Workflow, and they have many similarities: both involve
> orchestrating Jenkins build activities from a Groovy script run in-VM on the
> master, and the `stage` step in Workflow was even inspired by a similar
> Build Flow primitive. I would say that there are two key distinctions:
And each seems to lack needed features provided by the other...
> · Build Flow scripts cannot directly run any build steps. They rely on you
> having separate (freestyle, etc.) projects with traditional configuration,
> and just orchestrate those builds with some “glue” logic.
In the current version, build flow doesn't have it's own workspace -
so you can't do things like polling scm changes to trigger builds or
archive artifacts from the multiple jobs you are orchestrating without
adding extra jobs just for those operations (which you'd expect the
top-level job to handle).
> Workflow also has
> a `build` step for this purpose (which needs to be fleshed out
> considerably), but its main design goal is letting you run build steps
> directly from the flow, so even a multistage pipeline can be described
> completely in one text file.
Workflow doesn't give you any access to the internals of the other
jobs it can start, so you can't ensure that that all are building the
same revision or find their results - or at least I don't see how to
do it.
> · Build Flow runs Groovy code synchronously in a Java thread. Thus, if
> Jenkins is restarted, your build is killed, just like a freestyle build
> would be. Workflow uses a custom-built (CPS) interpreter for Groovy that
> allows the flow and (in most cases) its individual steps to run piecemeal
> and asynchronously, surviving Jenkins restarts. In particular, the `sh` and
> `bat` steps are built using a fresh system (the Durable Task plugin) to
> allow them to survive Jenkins restarts and even slave channel reconnections,
> which is simply impossible for traditional Jenkins projects.
Jenkins master restarts haven't been a real issue for me, but is the
'durable' part available to everyone or just in the cloudbees
enterprise version?
--
Les Mikesell
lesmi...@gmail.com