We have been using the Gradle and Artifactory plugins on our production Jenkins instance for years using the traditional freestyle job types. We are now working on migrating all of our production builds to use Jenkins Pipeline scripts. As part of that transition we have a need to build Java projects using Gradle and publish artifacts generated by these projects to Artifactory. Further, nearly all of our production builds are performed within dockerized build environments so all build time dependencies can be managed and reproduced. However, I can not for the life of me find a way to get a simple Gradle operation to publish artifacts along with the requisite build info and back-links to the Artifactory build information. Here is an brief example of the sort of build configuration we are looking to use (in scripted pipeline format):
When running this build, the call to the gradle_proxy.run task produces the following error:
I will say that I am sort of flying blind here. Most of the docs and examples I've found online that integrate Gradle, Jenkins and Artifactory assume that you are using a freestyle job configuration or that you are using a Gradle binary (ie: not the Gradle wrapper) which is deployed explicitly by Jenkins, which is not something we can/want to do in our case. Also, I am not sure if Docker is somehow playing a part in this problem because none of the examples I've found online to orchestrate this type of build use Docker. So maybe this behavior / result is unique to this specific combination of build tools.
If anyone can tell me whether or not I've missed something obvious here in my build script, or perhaps point me to some documentation or examples that shows how to orchestrate this type of build, I would really appreciate it.