Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI parameter substitution for spec files #37

Closed
jgeorgeson opened this issue Jan 29, 2017 · 5 comments
Closed

CLI parameter substitution for spec files #37

jgeorgeson opened this issue Jan 29, 2017 · 5 comments

Comments

@jgeorgeson
Copy link
Contributor

I have a case where I want to loop over path strings and run an AQL query with a spec file. At present I have tokenized spec file with tokens like @@path@@ and I'll have a sed command in my shell loop to copy the template spec file substituting the correct value for that loop iteration in place of the token and running the CLI command with the temp file. I'd like something like a --spec-template with accompanying --token argument. Ideally supporting multiple usage of --token in a single command, with the value using a format like : (since ':' is a necessary part of the spec file it's a good choice for an illegal character in a token name and therefore a good choice of character to separate token name and value on command line).

@eyalbe4
Copy link
Contributor

eyalbe4 commented Jan 31, 2017

Thanks for this requirement @jgeorgeson.
We'll include it as part of one of the next releases.

@eyalbe4
Copy link
Contributor

eyalbe4 commented Aug 2, 2017

@jgeorgeson,
The latest JFrog CLI release includes the --spec-vars options for all commands which support File Specs.
Did you get a chance to try this out?

@jgeorgeson
Copy link
Contributor Author

I did not! Fantastic! I hadn't readily found release notes (I've found them now) to know what was new in 1.10.

@jgeorgeson
Copy link
Contributor Author

Working nicely so far, issue is resolved for me. Only suggestion would be improving error messages. When supplying a parameterized spec file without a --spec-vars argument I am shown the usage statement with no indication what was missing or wrong. Though to be fair that's a general issue rather than specific to this feature.

@faizan002
Copy link

It is closed issue but Does --spec-vars work with "props" as well ? if props are a list of properties like key=value;key1=value1 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants