I have the following situation:
My build invokes a gradle task in a plugin. This task simply exec’s scp to copy one or more of the output files built by gradle to a directory on another machine, and prints out some useful output that appears in the Jenkins console output. This build is invoked from Jenkins.
Up to now that behavior has been sufficient. But I want to differentiate the case where the file copied is creating a new file in the target directory from the case where the file overwrites a file of the same name in the target directory, and pass this knowledge as an output parameter back to Jenkins. It’s easy enough to do the checking in the task but how to pass the output new/overwrite distinction back to Jenkins is eluding me.
Does anyone have a solution here?