I’ve seen many articles for sending Jenkins parameters to Gradle, which are passed as System variables, but have not come across doing the opposite. In my build.gradle file I have specified 2 parameters for a file name and version number. In order to pass this file name to the next job in the pipeline, I’d like to send the parameters to the next Jenkins job so it can make use of the file.
I’ve looked at just running a shell command to get the filename with a combo of awk/sed but it wouldn’t be flexible enough over time if the name/version details changed significantly.
Is sending gradle params back to Jenkins possible using built in functionality?