Reputation: 11251
I want to write file from groovy. I tried execute shell, but for some reason it doesn't work.
this_job_id = 43294;
"echo THIS_JOB_ID=${this_job_id.toString()} > build_groovy.properties".execute()
For some reason build_groovy.properties doesn't create
Upvotes: 1
Views: 923
Reputation: 171054
Just write a file from groovy
new File('build_groovy.properties').text = "THIS_JOB_ID=$this_job_id"
Upvotes: 2