Getting the configuration at the StepExecution fixed it, thanks a lot for the help and the revelations!
El lunes, 4 de febrero de 2019, 15:21:28 (UTC+1), Jesse Glick escribió: > > On Mon, Feb 4, 2019 at 4:49 AM Carles Capdevila Tejada > <[email protected] <javascript:>> wrote: > > I thought that pipeline code is always executed in the master > > “Pipeline code” is too broad an expression to be meaningful. The > bodies of specific API methods, such as `StepExecution.start` or > `SimpleBuildStep.perform`, are indeed run on the master. But if you > use `Callable` / `FileCallable` then you are requesting the body to > potentially be run on an agent. And `ConsoleLogFilter`s / > `TaskListenerDecorator`s may be run on agents. > > > unless inside of a node() step > > Running “inside” a `node` block has no effect on where code runs, > except insofar as code which _might_ run on an agent _could not_ even > start if you were not inside a `node` block. (Typically seen by the > engine refusing to run a step, throwing > `MissingContextVariableException`.) The `node` block merely offers a > contextual `FilePath`, `Computer`, etc. for any code which might ask > for it via `StepContext.get`. > > > In the mentioned execution the step is called outside of a node() step, > like so: > > > > logFileFilter () { > > node (nodeLabel) { > > ... > > > > So shouldn't it be executed on the master? > > No, because the `sh` step inside `node` remotes a `TaskListener` to an > agent whose serial state includes your `ConsoleLogFilter`. > -- 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/99e4dff7-5cc0-4f17-b407-580b7f8fa645%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
