Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

I have the CLI plugin installed but how do I use it from Jenkins

Enterprise Devops April 13, 2020

Guys,

So I have this CLI plugin installed I went thru the docs and see examples but I think they assume I know how to run them. What I need to do is do some action against a repo using this as there is no REST API for setting the branch restrictions. I saw this has that capability but I have no idea how to call this from Jenkins...I could ssh from Jenkins to the Bitbucket server but what is the application name? Once the plugin is installed should it be available at the OS? I am on Linux.  I mean is it just ACLI then the parameters? or what is the executable? Is there a way to call it without ssh to the server? 

These are probably simple but I need a kick start.

Thanks

1 answer

1 accepted

0 votes
Answer accepted
Michael Kuhl {Appfire}
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 14, 2020

Hi @Enterprise Devops - You're really close!  Once the ACLI is installed on the server from which you will run it, you can simply run it like anything else in the shell.  acli is the shell script you will run and then you provide the action you wish to take and the parameters for that action.
Example:

acli --action addSshKey --userId "testuser1" --file "./sshkey.rsa.pub" --server https://mybitbucket --user [user] --password [password]
Enterprise Devops April 14, 2020

Michael,

Ok so what does installing the plugin in bitbucket get me? Does that install acli on the bitbucket server? or do we also have to download/install say Linux: ACLI-9.2.0-installer.run and then whne you run it is it independent of the plugin? Or does it work with the plugin? Guess I don't understand the purpose of it. Sorry for the noob questions but this is my first foray into using this because I want to set branch restrictions programatically and I can't find a good rest call to do it but saw cli can.

Enterprise Devops April 14, 2020

Never mind I see now you install the client where you will use it and you have to have the plugin installed for it to function so a client-server configuration style. I think I can take it from here I appreciate the help.

Michael Kuhl {Appfire}
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 14, 2020

No problem!  Feel free to ask here or our support team for any further help: 

https://appf.re/acli-support

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
6.10.0
TAGS
AUG Leaders

Atlassian Community Events