What's strange is that if I use sh() step it works ok. Isn't sh step also 
executing on the slave?

So this works fine:

---
node {
    stage('Test') {
        withCodeReviewAssistantGitHubCheckRun(args) {
            sh('ls -alh')
        }
    }
}
---


On Wednesday, April 17, 2019 at 6:47:49 PM UTC+3, Daniel Anechitoaie wrote:
>
> I'm using 
>
> <parent>
>     <groupId>org.jenkins-ci.plugins</groupId>
>     <artifactId>plugin</artifactId>
>     <version>3.6</version>
>     <relativePath />
> </parent>
>
>
> Is this the latest parent POM? I'm not sure how to check which is the 
> latest version available.
>
> On Wednesday, April 17, 2019 at 6:09:07 PM UTC+3, Jesse Glick wrote:
>>
>> On Wed, Apr 17, 2019 at 10:47 AM Daniel Anechitoaie 
>> <danie...@gmail.com> wrote: 
>> > So I think the problem might be with serialization and they way I try 
>> to capture data in TaskListenerDecorator 
>>
>> Probably. You should not be attempting to serialize a `StepExecution` 
>> there; it can only be saved in `program.dat`, whereas 
>> `TaskListenerDecorator` is sent to agent JVMs under some conditions 
>> (including your own `XMLLinterStepCallable`). Anyway your code could 
>> not possibly work as written since the `addBodyOutputLine` call would 
>> be made on a _copy_ of the original object, not the one actually used 
>> in the callback. If this output is important, you would need to 
>> explicitly stream it back to the master somehow, as in 
>>
>>
>> https://github.com/jenkinsci/workflow-basic-steps-plugin/blob/5d48ed444cd4041d4b00a2c7197559406d1a2c9a/src/main/java/org/jenkinsci/plugins/workflow/steps/TimeoutStepExecution.java#L255-L336
>>  
>>
>> (You must be very defensive when writing a `SlaveToMasterCallable`, so 
>> this is not for the faint-hearted, but it seems you have already 
>> gotten into some pretty advanced usage.) 
>>
>>
>> There may be some error being printed that you are not seeing 
>> currently—make sure you use the newest parent POM, and call the new 
>> API in 
>>
>> https://github.com/jenkinsci/jenkins-test-harness/pull/127 
>>
>> from your tests. 
>>
>>
>> BTW pending availability of 
>>
>> https://github.com/jenkinsci/jenkins/pull/3959 
>>
>> in your `jenkins.version`, you must override `flush` and `close` as 
>> shown there. Also `XMLLinterStepCallable.invoke` should `flush` before 
>> exiting. 
>>
>

-- 
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 jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/dede9132-120f-4eb5-806e-06a2db04163b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to