On 02.01.2016, at 22:39, Craig Rodrigues <rod...@FreeBSD.org> wrote:
> If I have a checkout() command directly in the workflow script itself, why can't the workflow detect
> that an SCM is in use?
You mean the command that takes a bunch of parameters (including SCM type and URL) whose values may only be known during execution because they may be provided e.g. by build parameters?
It's also entirely possible to checkout repeatedly, in a loop, so the number of executions of the `checkout` command could range from 0 to potentially infinite.
Besides, Groovy is a pretty fancy language, so I wouldn't be surprised if it were actually really difficult to determine whether the `checkout()` that is called actually is the SCM checkout step.
> Are you sure about that? How can I configure this behavior?
You can't, that choice was made for you in the Workflow plugin development. I just explained what choices were possible here AFAICT, and why I believe this one was chosen.