I am writing a Jenkinsfile to get a build from Artifactory, so I an downloading the build using File specs. The problem is that for this project the build parameter changes per release
release v1.8.1 -> appName.build.release::v1.0.0
release v2.0.0 -> appName.build.hf.release::v2.0.0
I tried to use a regex in order to get the latest build
{
"pattern": "my_artifactory_repo/apps/appName/*/*/*.exe",
"build": "appName.build*release*/LATEST",
"target": "target_path",
"flat": "true"
},
But this caused a fail to download such release
expected to call org.jfrog.hudson.pipeline.types.ArtifactoryServer.download but wound up catching artifactoryDownload
Why does the "build" parameter does not accept the wildcard? What is the practical solution for this?
It's easier to use artifact python module. I wrote a python script called from the Jenkinsfile to solve the problem.
pip install artifactory