-
Bug
-
Resolution: Unresolved
-
Critical
-
None
-
artifactory plugin: 2.9.1-SNAPSHOT (private-01/24/2017 10:44-jenkins)
jenkins: 2.40
Yes I am using a snapshot build, due to JENKINS-41227 I was using plugin 2.8.1, which did work.
pipeline script:
def artiServer = Artifactory.server('snowball-artifactory') def repoDir = "rpms-thirdparty-local/centos/6.6/gs-test-arti-upload/${buildNumber}" def uploadSpec = """{ "files": [ { "pattern": "(configur*)", "target": "${repoDir}/{1}", "props": "${artiProps};build.name=${JOB_NAME};build.number=${BUILD_NUMBER}" } ] }""" def uploadBuildInfo = artiServer.upload spec: uploadSpec if ( uploadBuildInfo == null ){ println "buildinfo null" } else{ println "buildinfo not null" } uploadBuildInfo.env.filter.addInclude("*") uploadBuildInfo.retention maxBuilds: 10, deleteBuildArtifacts: true artiServer.publishBuildInfo uploadBuildInfo
neither one of the println statements prints. The file does upload, but no buildinfo is returned. No exception is thrown either.
Can you please try and remove the props from your Upload Spec? I noticed you are forcing the build.name and build.number on the uploaded files, which is something that happens automatically. I don't think that this caused the issue though. Are you using the latest release of the Artifactory Plugin now?
Also, can you check the Artifactory request logs to see if it gets the build-info publish request?