Hi,
I would like to config the task of sending email controlled by script result. The idea is to judge if a specific file existed, if exist, then send email otherwise don't send. The script shows as below, I tried this script in my local computer, it can get the true result, but in quick build side, I still can't get the email notification, and I checked the path of build agent, the file indeed exists, so not sure something wrong here. Thanks for your help.
groovy:
def file1 = newFile("C:/buildagent/buildagent/workspace/root/nsg/mti_component_mfg_test/nand_burn/Product/N38B/git_trigger/release_burn/platform/testflow_diff_report_SDP_mppr18_waveid02.html")
if (file1.exists()) {
return true
}
else{
return false
}