Files generated by jenkins during a build is created in the master. You have to use the "readFile" to use it in the compute environment of the slaves/agents
On Thu, Feb 15, 2018 at 10:57 AM, red 888 <[email protected]> wrote: > I have a windows master that executes a stage in a container on a linux > slave. > > > Groovy is appending a "C:" to the path inside the linux container- totally > breaking it: > > stage('sdlfkjsldkf') { > agent { > docker { > image "library/alpine" > } > } > > steps { > script { > new File("${workspace}/blah") > .traverse(type: FileType.DIRECTORIES, nameFilter: > 'subfolder') { > echo "${it.path}" > } > } > > The error I get: > > java.io.FileNotFoundException: > C:\home\jenkins\workspace\myworkspace\blah\subfolder > > if I echo ${workspace} it correctly starts at /home, but it looks like new > file want to add "C:" to the beginning of it > > -- > 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/2ee3d6c3-95b9-4f45-acf9-704228b0717b%40googlegroups. > com > <https://groups.google.com/d/msgid/jenkinsci-users/2ee3d6c3-95b9-4f45-acf9-704228b0717b%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Regards nirish okram -- 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/CAPzcO4hGy_HK2Cr83ZQDDZQ0_HhnfdCHXrbAySA_r35Sd4vKWA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
