Re: A simple update to pom.xml jenkins and plugin version seems to have created hundreds of changes from Infra in CI changes log?

2019-04-17 Thread Mike Caspar
Hmm. Thanks for the update Jesse. My goal was to just keep the plugin at a place were it's still compatible (or relatively so) to make it easier should a new developer want to take it over. Therefore, it seems that the default behavior is exactly what I wanted ! :-> In a year or so, when I

Re: Any idea what could cause Jenkins console output to be mixed like this in a pipeline job?

2019-04-17 Thread Martin Weber
Am Dienstag, 16. April 2019, 23:06:34 CEST schrieb Jesse Glick: > On Tue, Apr 16, 2019 at 12:57 PM Daniel Anechitoaie > > wrote: > > This seems too be happening only wen I run Jenkins in a Master/Slave setup > > (2 servers). If I only have the master it seems there's no problem with > > the

Re: A simple update to pom.xml jenkins and plugin version seems to have created hundreds of changes from Infra in CI changes log?

2019-04-17 Thread Jesse Glick
On Wed, Apr 17, 2019 at 2:33 PM Mike Caspar wrote: > I was concerned to see the CI build server think there are hundreds of infra > changes in my commit Well, because there probably were: https://github.com/jenkins-infra/pipeline-library/commits Since any of these could potentially have

Re: A simple update to pom.xml jenkins and plugin version seems to have created hundreds of changes from Infra in CI changes log?

2019-04-17 Thread Mike Caspar
More info... Just noticed commits to this project from almost 1 year ago that don't come from me in the Blue Ocean interface... https://ci.jenkins.io/blue/organizations/jenkins/Plugins%2Fironmq-notifier-plugin/detail/master/24/changes Mike On Wednesday, April 17, 2019 at 11:33:25 AM UTC-7,

A simple update to pom.xml jenkins and plugin version seems to have created hundreds of changes from Infra in CI changes log?

2019-04-17 Thread Mike Caspar
Hi there. Today I decided to just get the POM Plugin version updated to something current and test with a new version of Jenkins to keep things at least relatively current The last time I pushed was more than a year ago. I was concerned to see the CI build server think there are hundreds of

Re: Any idea why a TaskListenerDecorator could cause logger.println() to throw null pointer exception

2019-04-17 Thread Jesse Glick
On Wed, Apr 17, 2019 at 11:53 AM Daniel Anechitoaie wrote: > What's strange is that if I use sh() step it works ok. Isn't sh step also > executing on the slave? Yes but traditionally the _output_ was processed on the master not the agent. That is still true by default, pending JENKINS-52165

Re: Any idea why a TaskListenerDecorator could cause logger.println() to throw null pointer exception

2019-04-17 Thread Matt Sicker
Latest release is 3.42: https://github.com/jenkinsci/plugin-pom/releases On Wed, Apr 17, 2019 at 10:53 AM Daniel Anechitoaie wrote: > > 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 { >

Re: Any idea why a TaskListenerDecorator could cause logger.println() to throw null pointer exception

2019-04-17 Thread Daniel Anechitoaie
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

Re: Any idea why a TaskListenerDecorator could cause logger.println() to throw null pointer exception

2019-04-17 Thread Daniel Anechitoaie
I'm using org.jenkins-ci.plugins plugin 3.6 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 > >

Re: Any idea why a TaskListenerDecorator could cause logger.println() to throw null pointer exception

2019-04-17 Thread Jesse Glick
On Wed, Apr 17, 2019 at 10:47 AM Daniel Anechitoaie 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`,

Re: Any idea why a TaskListenerDecorator could cause logger.println() to throw null pointer exception

2019-04-17 Thread Daniel Anechitoaie
Nope. I'm still getting NullPointerException even with getContext().newBodyInvoker() .withContexts(environmentExpander, taskListenerDecorator) .withCallback(BodyExecutionCallback.wrap(getContext())) .start(); So something else must be the issue but not sure what. On Wednesday, April 17,

Re: Any idea why a TaskListenerDecorator could cause logger.println() to throw null pointer exception

2019-04-17 Thread Daniel Anechitoaie
I suspect my problem is with .withCallback(new WithCheckRunStepExecutionCallback(this)) ? But then if I use ".withCallback(BodyExecutionCallback.wrap(getContext()))" instead, how will I be able to read a variable from within StepExecution class? On Wednesday, April 17, 2019 at 4:18:28 PM

Any idea why a TaskListenerDecorator could cause logger.println() to throw null pointer exception

2019-04-17 Thread Daniel Anechitoaie
I have a pipeline step plugin that wraps other steps and captures the output and for some reason this causes a Null Pointer Exception when I try to do logger.println() from the step plugin that is wrapped. *So with this pipeline:* --- node { stage('Test') {

Re: When using the dir step in a Jenkins pipeline is there any way to get that value from a step within?

2019-04-17 Thread Daniel Anechitoaie
Yep, works as expected. Thanks On Wednesday, April 17, 2019 at 2:09:10 PM UTC+3, Daniel Anechitoaie wrote: > > This makes sense. Not sure why I was confused about this. > I'm in the process of migrating it from "extends Builder implements > SimpleBuildStep" to "extends Step". > > I'll post back

Re: When using the dir step in a Jenkins pipeline is there any way to get that value from a step within?

2019-04-17 Thread Daniel Anechitoaie
This makes sense. Not sure why I was confused about this. I'm in the process of migrating it from "extends Builder implements SimpleBuildStep" to "extends Step". I'll post back how it goes. Thank you for clarification. On Wednesday, April 17, 2019 at 2:01:41 PM UTC+3, Robert Sandell wrote: > >

Re: When using the dir step in a Jenkins pipeline is there any way to get that value from a step within?

2019-04-17 Thread Robert Sandell
I'm not sure I understand the question completely. But the FilePath object in the step context will be what the current working directory is. So if your step is called inside a dir step then the FilePath will be that directory otherwise it will be the workspace, or null if the step gets called

When using the dir step in a Jenkins pipeline is there any way to get that value from a step within?

2019-04-17 Thread Daniel Anechitoaie
I'm working on Jenkins pipeline plugin that generates some paths relative to the workspace at the moment. But sometimes I need to wrap my plugin with dir - https://github.com/jenkinsci/workflow-basic-steps-plugin/blob/master/src/main/java/org/jenkinsci/plugins/workflow/steps/PushdStep.java