Quantcast

how to read the content of a file in the remote workspace via groovy postbuild plugin

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

how to read the content of a file in the remote workspace via groovy postbuild plugin

mchiu
Hi ALL
          I am trying to read the content of a file in the remote workspace using the GroovyPostbuild Plugin. It seem i have to use  FilePath to access the remote file . does anyone have similar experience on this ? or give me a example ?

Thanks in advanced.

Michael Chiu
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: how to read the content of a file in the remote workspace via groovy postbuild plugin

mchiu
I share my code . I would like to read the log from slave workspace into the email notification via email-ext plugin with groovy script template. The following is the snippet .

def failed_case = build.getParent().getWorkspace().child('file.txt').readToString()
println failed_case



michael chiu於 2012年7月31日星期二UTC+8下午12時17分41秒寫道:
Hi ALL
          I am trying to read the content of a file in the remote workspace using the GroovyPostbuild Plugin. It seem i have to use  FilePath to access the remote file . does anyone have similar experience on this ? or give me a example ?

Thanks in advanced.

Michael Chiu
Loading...