Reputation: 49
I have a jenkins job that generates properties file in the workspace. I want to know if it is possible read the property file from workspace and then pass it as a argument for a program in the next build step of the same job??
I tried reading to read the file via a groovy script
echo env.WORKSPACE
64
String fileContents = new File("${env.WORKSPACE}"/key_generate.properties").getText('UTF-8')
but i get the below error java.io.IOException: Cannot run program "groovy" (in C:\xyz\directory path)
I am using a windows node
Upvotes: 1
Views: 271