El jueves, 31 de enero de 2019, 20:09:29 (UTC+1), Jesse Glick escribió:
>
> On Thu, Jan 31, 2019 at 1:19 PM Carles Capdevila Tejada 
> <[email protected] <javascript:>> wrote: 
> > java.lang.IllegalStateException: Jenkins.instance is missing. Read the 
> documentation of Jenkins.getInstanceOrNull to see what you are doing wrong. 
> >         at jenkins.model.Jenkins.get(Jenkins.java:758) 
> >         at 
> jenkins.model.GlobalConfiguration.all(GlobalConfiguration.java:75) 
> >         at 
> com.tsystems.sbs.LogFileFilterConfig.get(LogFileFilterConfig.java:27) 
> >         at 
> com.tsystems.sbs.LogFileFilterOutputStream.<init>(LogFileFilterOutputStream.java:42)
>  
>
> >         at 
> com.tsystems.sbs.LogFileFilterConsoleLogFilter.decorateLogger(LogFileFilterConsoleLogFilter.java:32)
>  
>
> >         at 
> hudson.console.ConsoleLogFilter.decorateLogger(ConsoleLogFilter.java:60) 
> >         at … 
> >         at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1304) 
> >         at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1266) 
> >         at hudson.remoting.UserRequest.perform(UserRequest.java:212) 
> >         at … 
>
> This is running inside an agent JVM. Thus you may not refer to a 
> `GlobalConfiguration`, which exists on the master side. Whatever 
> configuration state you need must be extracted from 
> `LogFileFilterConfig` when the `LogFileFilterConsoleLogFilter` is 
> created in the `StepExecution`, and saved in `Serializable` fields. 
>

Thanks for the help Jesse! Though I thought that pipeline code is always 
executed in the master,
unless inside of a node() step :/

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?
Thanks!

-- 
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/f5528a04-dbdb-4f50-a4e0-1d2116166206%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to