Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Read / Parse file to populate 'Prompt as Selection box' Variable #6

neil.calverley ·

I'm looking to ultimately read and parse an xml file in order to populate a Variable using the 'prompt as selection box' option.

currently just to test this I have the following script code in the 'Choices' field -

${groovy:

import java.io.File;   

def str = new File(configuration.getWorkspaceDir().getAbsolutePath() + "/Source_path/datasources.txt").text}

return str

/}

However this simple test fails with -

java.io.FileNotFoundException: /home/build/work/Source_path/datasources.txt (Permission denied)

Any ideas what I'm doing wrong?

  • replies 2
  • views 520
  • stars 0
neil.calverley ·

I can confirm also that the file and path exists on the relevant node

steveluo2 ADMIN ·

Please re-post this topic to QuickBuild category, here is mainly for discussing this site only.