Re: [workflow-plugin] Reading and parsing property file

2015-01-15 Thread Gary Clayburg
FYI - the syntax for readFile() is incorrect. It should be: def str = readFile file: 'somefile', encoding : 'utf-8' -- 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

Re: [workflow-plugin] Reading and parsing property file

2014-11-28 Thread Rupali
Thanks James. That worked. Regards, Rupali On Thursday, November 27, 2014 5:40:16 PM UTC+5:30, Rupali wrote: > > Hi, > > I tried reading file from workspace using *readFile* and then echo the > results. That works just fine. But I was unable to parse it and retrieve > specific values. Is there

Re: [workflow-plugin] Reading and parsing property file

2014-11-27 Thread James Nord
Hi Rupali, readFile returns a String object with the entire contents of the file - so you can parse it using stand java/groovy APIs. .e.g. you can chain a StringReader and Properties https://docs.oracle.com/javase/7/docs/api/java/util/Properties.html#load(java.io.Reader) http://docs.oracle.com/

[workflow-plugin] Reading and parsing property file

2014-11-27 Thread Rupali
Hi, I tried reading file from workspace using *readFile* and then echo the results. That works just fine. But I was unable to parse it and retrieve specific values. Is there a way to parse the contents of this file and read properties into variables? File will contain key=value kind of entries.