Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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

Hi @TC - 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]

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.

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.

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
Community showcase
Published in Bitbucket

Calling any interview participants for Bitbucket Data Center

Hi everyone,  We are looking to learn more about development teams’ workflows and pain points, especially around DevOps, integrations, administration, scale, security, and the related challeng...

451 views 4 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you