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