I am using rtDownload
DSL block of the Jenkins JFrog Artifactory plugin in my Jenkins pipeline to download some artifacts from Artifactory OSS. This is how my rtDownload step looks.
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. I can see the Build IDs in artifactory correctly. 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.
*
also match the'/' character? Sometimes**
is used to match a deep folder structure. - Moberg