[英]Artifactory Jenkins plugin download command not honouring build info in spec
I am using rtDownload
DSL block of the Jenkins JFrog Artifactory plugin in my Jenkins pipeline to download some artifacts from Artifactory OSS.我在我的 Jenkins 管道中使用 Jenkins JFrog Artifactory 插件的
rtDownload
DSL 块从 Artifactory OSS 下载一些工件。 This is how my rtDownload step looks.这就是我的 rtDownload 步骤的样子。
rtDownload (
serverId: "artifactory",
spec:
"""{
"files": [
{
"pattern": "esb-dev-local/**",
"target": "artifacts/",
"build": "TestJob/58"
}
]
}"""
)
However, this seems to download all the files that match the Build Name (TestJob) and doesn't filter by the build number.但是,这似乎会下载与构建名称 (TestJob) 匹配的所有文件,并且不会按构建编号进行过滤。 I can see the Build IDs in artifactory correctly.
我可以正确地看到 artifactory 中的 Build ID。 Any clues on what I may be doing wrong?
关于我可能做错了什么的任何线索?
Here's the output from Jenkins这是詹金斯的输出
[Pipeline] rtDownload
Downloading artifacts using pattern: esb-dev-local/**
Beginning to resolve Build Info published dependencies.
Downloading 'http://<MASKED>:8081/artifactory/esb-dev-local/<MASKED>/1.0_58/<MASKED>-1.0_58.pom'...
Successfully downloaded 'http://<MASKED>:8081/artifactory/esb-dev-local/<MASKED>/1.0_58/<MASKED>-1.0_58.pom' to '/var/lib/jenkins/workspace/<MASKED>/artifacts/<MASKED>/1.0_58/<MASKED>-1.0_58.pom'
Downloading 'http://<MASKED>:8081/artifactory/esb-dev-local/<MASKED>/1.0_58/<MASKED>-1.0_58-cfg.zip'...
Successfully downloaded 'http://<MASKED>:8081/artifactory/esb-dev-local/<MASKED>/1.0_58/<MASKED>-1.0_58-cfg.zip' to '/var/lib/jenkins/workspace/<MASKED>/artifacts/<MASKED>/1.0_58/<MASKED>-1.0_58-cfg.zip'
Downloading 'http://<MASKED>:8081/artifactory/esb-dev-local/<MASKED>/1.0_58/<MASKED>-1.0_58.pom'...
Successfully downloaded 'http://<MASKED>:8081/artifactory/esb-dev-local/<MASKED>/1.0_58/<MASKED>-1.0_58.pom' to '/var/lib/jenkins/workspace/<MASKED>/artifacts/<MASKED>/1.0_58/<MASKED>-1.0_58.pom'
Downloading 'http://<MASKED>:8081/artifactory/esb-dev-local/<MASKED>/1.0_32/<MASKED>-1.0_32.pom'...
Successfully downloaded 'http://<MASKED>:8081/artifactory/esb-dev-local/<MASKED>/1.0_32/<MASKED>-1.0_32.pom' to '/var/lib/jenkins/workspace/<MASKED>/artifacts/<MASKED>/1.0_32/<MASKED>-1.0_32.pom'
Downloading 'http://<MASKED>:8081/artifactory/esb-dev-local/<MASKED>/1.0_58/<MASKED>-1.0_58.jar'...
Successfully downloaded 'http://<MASKED>:8081/artifactory/esb-dev-local/<MASKED>/1.0_58/<MASKED>-1.0_58.jar' to '/var/lib/jenkins/workspace/<MASKED>/artifacts/<MASKED>/1.0_58/<MASKED>-1.0_58.jar'
Downloading 'http://<MASKED>:8081/artifactory/esb-dev-local/<MASKED>/1.0_58/<MASKED>-1.0_58.jar'...
Successfully downloaded 'http://<MASKED>:8081/artifactory/esb-dev-local/<MASKED>/1.0_58/<MASKED>-1.0_58.jar' to '/var/lib/jenkins/workspace/<MASKED>/artifacts/<MASKED>/1.0_58/<MASKED>-1.0_58.jar'
Downloading 'http://<MASKED>:8081/artifactory/esb-dev-local/<MASKED>/1.0_46/<MASKED>-1.0_46.pom'...
Successfully downloaded 'http://<MASKED>:8081/artifactory/esb-dev-local/<MASKED>/1.0_46/<MASKED>-1.0_46.pom' to '/var/lib/jenkins/workspace/<MASKED>/artifacts/<MASKED>/1.0_46/<MASKED>-1.0_46.pom'
Downloading 'http://<MASKED>:8081/artifactory/esb-dev-local/<MASKED>/${projVersion}/<MASKED>-${projVersion}.pom'...
Successfully downloaded 'http://<MASKED>:8081/artifactory/esb-dev-local/<MASKED>/${projVersion}/<MASKED>-${projVersion}.pom' to '/var/lib/jenkins/workspace/<MASKED>/artifacts/<MASKED>/${projVersion}/<MASKED>-${projVersion}.pom'
Downloading 'http://<MASKED>:8081/artifactory/esb-dev-local/<MASKED>/1.0_33/<MASKED>-1.0_33.pom'...
Successfully downloaded 'http://<MASKED>:8081/artifactory/esb-dev-local/<MASKED>/1.0_33/<MASKED>-1.0_33.pom' to '/var/lib/jenkins/workspace/<MASKED>/artifacts/<MASKED>/1.0_33/<MASKED>-1.0_33.pom'
Finished resolving Build Info published dependencies.
The artifacts downloaded are equal (by checksum) to the ones belong to the requested build (name & number).下载的工件(通过校验和)与属于请求的构建(名称和编号)的工件相同。
In the scenario where several artifacts match a checksum listed in a build, the correct download path is determined by the artifact's properties (build name & number).在多个工件与构建中列出的校验和匹配的情况下,正确的下载路径由工件的属性(构建名称和编号)确定。 However, since Artifactory OSS does not support artifacts properties, the path returned is undetermined.
但是,由于 Artifactory OSS 不支持 artifacts 属性,返回的路径是不确定的。
This is why you see some artifacts downloaded from the paths of other build numbers.这就是为什么您会看到一些从其他版本号的路径下载的工件。 These artifacts were correctly downloaded, but from a seemingly different path.
这些工件已正确下载,但来自看似不同的路径。
您可以尝试使用来自 json 文件的 specPath 采购
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.