jfrog / jenkins-artifactory-plugin

Jenkins artifactory plugin
http://jenkins-ci.org/
114 stars 186 forks source link

Implement "spec-vars" from JFrog CLI #425

Open JakobGlass opened 3 years ago

JakobGlass commented 3 years ago

When working with the JFrog CLI, you have the option to add a spec-vars parameter where you can replace variables found within the corresponding File Spec JSON.

Using the CLI, I could easily do everything in one line, with something like: jfrog rt dl --spec spec.json --spec-vars="foo=fooValue;bar=barValue".

My current solution to get around this is by adding a script to replace these variables and write the changes to the JSON.

It would be nice to see a cleaner way of doing this, like adding a specVars parameter to rtDownload.

iggelin commented 1 year ago

Is there any development plan for this feature? or any good workaround?

jrydow commented 6 months ago

This is something I want as well. The file-spec is rather useless if it is not possible to inject for example a build number or a branch. I have tried to inject a build number with the env inject plugin but I can't get a Freestyle project to do things in the right order. So are there any workarounds or any work on this?