Bryan, FYI ... have you tried to achieve the same result using JELLY scripting?
.. Mgimza On Mon, Oct 15, 2012 at 8:48 PM, Slide <slide.o....@gmail.com> wrote: > You probably want to look at the FilePath [1] documentation and use that > in the script. As for modifying the subject, you will need to upgrade to > >2.22 for that. > > Thanks, > > slide > > [1] - http://javadoc.jenkins-ci.org/hudson/FilePath.html > > > On Mon, Oct 15, 2012 at 5:27 PM, Bryan Hunt <bryanh...@gmail.com> wrote: > >> New subscriber here... >> >> I have searched through the archives looking for an answer but haven't >> yet been able to find a solution to my problem (even though it appears this >> question has been asked before) >> >> I have specific build output that I need to load into my email-ext script >> (a specially formatted version string) so I have the following code in the >> start of my groovy script which works fine if everything is executed from >> the master but fails otherwise >> >> <% def versionString = "" >> fr = new FileReader(build.workspace.toString() + "\\Build\\version.txt") >> if (fr != null) { >> versionString = fr.readLine() >> } %> >> >> Produces the following error: >> Exception: javax.script.ScriptException: >> java.io.FileNotFoundException: >> c:\jenkins\workspace\project_name\Build\version.txt (No such file or >> directory) >> >> **** >> >> So aside from the obvious need for a try/catch block does anyone have >> a recommendation for loading a file from a slave? >> Regards, >> Bryan H. >> >> P.S. Is there a way to change the MimeMessage.subject from inside the >> groovy body script (or do I have to ask my administrator to kindly update >> the plugin to a version > 2.22)? >> > > > > -- > Website: http://earl-of-code.com >