ttt
ttt

Reputation: 219

Show list of released artifactory versions for deploy build in Jenkins

I have a release build that compiles and publishes the war file to Artifactory. I'd like to have a manually run parameterized build where I can choose among the release builds that it will then pull that artifact from Artifactory and deploy it. Deployment works fine, it's the choosing I'm having trouble figuring out how to do.

Is there a straightforward way to do something like this?

The closest thing I found was Promoted Build Parameter, but this doesn't seem to give me what I need as I don't know how to translate from what it gives to the file in Artifactory.

Upvotes: 2

Views: 2483

Answers (1)

Larry Cai
Larry Cai

Reputation: 59963

Use one script based on Artifactory REST API to fetch the needed artifacts from artifactory server.

In jenkins job, the Choice parameter can be used.

Then in the executed shell script, you pass the parameter to the script to download the artifacts.

It works fine for us.

Upvotes: 1

Related Questions