Closed thomas-galla closed 1 year ago
For anyone else having this problem - setting the JFROG_BINARY_PATH seems to be a workaround:
node {
withEnv(["JFROG_BINARY_PATH=${tool 'jfrog-cli'}"]){
jf 'rt bpr mybuild my-staging'
}
}
If no JFROG_BINARY_PATH ist set the binary path should not be null/jf or null\jf.exe though.
@chrismathis Thank you for providing this workaround. I can confirm that this approach does the trick.
Thank you @chrismathis! We'll add it to the documentation.
How can we help?
How would we use the jenkins-jfrog-plugin in a Scripted Pipeline?
The
tool name: 'jfrog-cli', type: 'jfrog'
was created using Snippet Generator.See this pipeline:
Output is
So the path is not being set in the tool step. It appears to be a problem reported also for other tools when using Scripted Pipelines but is there any other solution than to wrap the jf call into some sh() call?