On Fri, Aug 1, 2014 at 6:50 AM, Sagi Sinai-Glazer <[email protected]> wrote:
> I have found some issues I'd like to share with you and hopefully promote
> them in future releases.

Excellent, keep it coming.

> Where can I find documentation of the supported Groovy CPS DSL syntax?

It is pretty early for formal documentation. The Groovy itself needs
no special documentation beyond groovy.codehaus.org.

As to invoking steps,
https://github.com/jenkinsci/workflow-plugin/pull/8 is still open but
when closed you will just write the steps’s function name as a Groovy
function call. We do not yet have a system for enumerating step names,
so you just have to check sources.

Steps take named parameters (which Groovy supports naturally); if you
are just setting one parameter named ‘value’, you can omit the
‘value:’ prefix as a convenience (akin to Java annotations). Again
there is not yet any mechanism for generated documentation of
parameters, though it would be nice to add one via an annotation
processor.

> Is there a way to build existing jobs?

In trunk sources, yes there is a ‘build’ step. (Not in 0.1-beta-1.)

> How can I dynamically run a function/closure with different parameters in 
> parallel?
>
> o   BuildFlow Example:
>
> parallel ( (1..maxValue).collect { ctr -> someClosureUsing_ctr} )

Untested but probably something like:

parallel((1..maxValue).collect {ctr -> ctr: {-> doSomethingWith(ctr)}})

(The ‘parallel’ step in Workflow takes “thread names” as the parameter
keys and closures as values.)

> Is it possible to specify a tool's version for scm steps (e.g. git 1.2.3)?

Not currently. Would be simple to add.

> How can I reuse script code between different Workflow jobs?

Not yet implemented.

> Console Output prints are not synced with actual run making it
> almost impossible to read.

Not sure what you mean.

> org.jenkinsci.plugins.workflow.cps.ParallelStepException fails
> the entire build/workflow and not just the step.
>
> with.node('master') { parallel({sh ("pwd")}, {sh ("noop")}, {sh ("ls")})}

I think that is by design. Did you try wrapping the body of each
branch in a try-catch block?

> java.lang.UnsupportedOperationException hangs the build.
>
> o   Example:
>
> println a[0]  // doesn't like []

Not sure I follow what is going on there (what is ‘a’?), but if you
have a reproducible bug please file it in the ‘workflow’ component.

Generally, there are a lot of miscellaneous robustness issues like
these outstanding; we are not focusing on that kind of thing at this
stage.

> There are no line numbers in the Groovy CPS DSL Script text box.
> So when compilation/run-time errors are received, it's hard to find the
> right erroneous line.

Of course. This falls into the same discussion as reusing script code,
since we would not expect authors of complex flows to be writing
anything much in the Script text box except a request to load the real
script from elsewhere.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to