How to use JFrog cli in cake script

133 Views Asked by At

We are using cake script as part of our build process. Please let me know how can I use JFrog cli command in cake script.

https://www.jfrog.com/confluence/display/CLI/JFrog+CLI

jf rt u

1

There are 1 best solutions below

0
Pascal Berger On BEST ANSWER

You can use any of the Command (https://cakebuild.net/dsl/command/) or StartProcess (https://cakebuild.net/dsl/process/) aliases. Command aliases make use of Tool resolution provided by Cake.

For example:

Command(
    new []{ "jf", "jf.exe"},
    "rt u"
);

See also this blog post for more examples: https://cakebuild.net/blog/2022/10/cake-v2.3.0-released#command-aliases

If the tool is not available on the machine Cake provides some ways to install tools. See Installing Tools for details.