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 how it goes.
>
> Thank you for clarification.
>
> On Wednesday, April 17, 2019 at 2:01:41 PM UTC+3, Robert Sandell wrote:
>>
>> 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 outside of a node step.
>> So you don't need to know if you are inside a dir step, just that there 
>> is a FilePath to use.
>>
>> https://github.com/jenkinsci/workflow-basic-steps-plugin/blob/master/src/main/java/org/jenkinsci/plugins/workflow/steps/PushdStep.java#L90-L93
>>
>> /B
>>
>> Den ons 17 apr. 2019 kl 12:22 skrev Daniel Anechitoaie <
>> danie...@gmail.com>:
>>
>>> 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
>>>  step.
>>> Is there any way from within my plugin to know if it was wrapped by the 
>>> "dir" step plugin so I can use that dir as a relative path vs if it was not 
>>> in which case I should use the workspace as a relative path?
>>>
>>> -- 
>>> 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 jenkin...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/jenkinsci-dev/5ce71f78-8765-4471-b9b1-31d118c43e83%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/jenkinsci-dev/5ce71f78-8765-4471-b9b1-31d118c43e83%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>> -- 
>> *Robert Sandell*
>> Software Engineer
>> CloudBees, Inc.
>> [image: CloudBees-Logo.png] <http://www.cloudbees.com/>
>> E: rsan...@cloudbees.com
>> Twitter: robert_sandell
>>
>

-- 
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/0c31105f-2931-4106-8f28-e306191794a6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to