When trying to execute a gradle build in a Jenkins pipeline job with the Artifactory plugin my build will finish successfully but fail due to the below error. There doesn't seem to be a .json file created for the build info in the /tmp directory.
My Artifactory Plugin is version 2.8.2.
My Jenkins version is the latest stable at 2.19.4
I see a similar question was posted here. The answer says the problem was fixed in the plugin version 2.8.2, but I'm still seeing the issue. Does anyone know what my issue could be?
This is my step command to execute the run.
buildInfo = rtGradle.run rootDir: "who/", buildFile: 'build.gradle', tasks: '--no-daemon -x artifactoryPublish runCI'
This is the error output.
:runCI
BUILD SUCCESSFUL
Total time: 54.091 secs
ERROR: Couldn't read generated build info at : /tmp/generated.build.info3392113078851872685.json
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // stage
[Pipeline] echo
THE BUILD FINISHED!!!!
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
groovy.lang.MissingPropertyException: No such property: any for class: groovy.lang.Binding
at groovy.lang.Binding.getVariable(Binding.java:63)
at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onGetProperty(SandboxInterceptor.java:224)
at org.kohsuke.groovy.sandbox.impl.Checker$4.call(Checker.java:241)
at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:238)
at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.getProperty(SandboxInvoker.java:28)
at com.cloudbees.groovy.cps.impl.PropertyAccessBlock.rawGet(PropertyAccessBlock.java:20)
at WorkflowScript.CatchError(WorkflowScript:109)
at WorkflowScript.run(WorkflowScript:13)
at ___cps.transform___(Native Method)
at com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.get(PropertyishBlock.java:74)