How do I write groovy script that executes simple shell command and update the env variable to a properties file so that it can be used later on by Email-Ext. Here is the shell command that I want to execute using groovy:
email_recipients=`cat ${WORKSPACE}/Var/Compile/Logs/set_email_recipients.properties`
echo email_recipients=${email_recipients} > email_update.prop
Once the property file email_update.prop is created, I want to add this to the Properties File Path as part of the injected environment variables.
How do I write this as part of my DSL script?