On Wednesday, February 4, 2015 at 5:28:49 PM UTC-5, Shane Kim wrote:
>
> maybe it's simple thing but I just couldn't find or get it working. How
> would I get the current workspace directory path?
>
pwd() returns a String (not an ArrayList as you claim!) of the current
workspace path.
env.WORKSPACE // gives me null
>
Yes, see related discussion about NODE_NAME.
> new File('.') // gives me Jenkins installation path rather than workspace
> ws { new File('.') } // gives me Jenkins installation path again.
>
It does not make sense to use java.io.File from a flow script, because the
Groovy code always runs on the Jenkins master, not the slave.
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" 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-users/9d645587-b6a9-4f05-bdbb-2c269399ef2e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.