Getting Started with Configuration for Mac and Linux



On this page

 

Description

The CLI can be used directly without any configuration using a java command or a user defined start script. Previously, users would normally customize their start script(s) with credentials and urls to make it easy to run actions.

Starting with CLI 8.6, it is possible to provide configuration in the form a standard property file. This is an alternative to defining unique start scripts or customizing the atlassian start script with credentials and urls. This section describes how this is done. Reference issue ACLI-691 and related.

Looking for Windows equivalent? Same configuration support works for Windows using the acli.bat start script only available with CLI 9.0 and higher. See Getting Started with Configuration for Windows

 Example Configuration Property Files

The CLI distribution contains example files for both Cloud and Server.

  1. Go to your CLI installation directory

  2. Rename the example file appropriate for your environment to acli.properties

  3. Customize it with your credentials and urls

 Cloud

  • Simplest example with one site that is identified to be used by default

  • Supports actions from multiple clients: jira, confluence, agile, servicedesk, and upm 

  • Some client actions depend on what support is licensed on the specific site

Example for Cloud: Create acli.properties
default = jiracloud -s https://examplegear.atlassian.net --user automation@examplegear.com --token xxxxxxxxxxxxxxxxxxxxxxxx
  • Alternative. Also a simple example for one site but more readily able to be expanded for multiple Cloud sites sharing the same Atlassian user 

Example for Cloud: acli-cloud.properties
# Example Cloud configuration - customize and rename this file to acli.properties # Cloud requires an email address and a corresponding API token from Atlassian. # Use an existing token or create one at https://id.atlassian.com/manage/api-tokens (requires an Atlassian account login). credentials = --user automation@examplegear.com --token xxxxxxxxxxxxxxxxxxxxxxxx cloudSite = examplegear myjira = jiracloud -s https://${cloudSite}.atlassian.net ${credentials} myconfluence = confluencecloud -s https://${cloudSite}.atlassian.net/wiki ${credentials} # This defines the default client for actions, choose the most likely used client default = ${myjira}

 Server

  • Simplest example with one site that is identified to be used by default

  • Supports actions from multiple clients: jira, agile, servicedesk, tempo, and upm

  • Some client actions depend on what support is installed and licensed on the specific site

Example Server configuration: acli.properties
default = jira -s http://localhost:8080 --user admin --password admin



  • Simple example for accessing multiple sites 

Example for Server: acli-server.properties

 ACLI Start Script

The CLI is a Java application and so can be called directly using the java command, however, it is usually better and recommended to use a start script which is easier to type and can be customized to make using the CLI easier. The CLI distribution has always provided some example start scripts to enable customers to construct their start script quickly. Example are scripts like jira.sh, confluence.sh, and the more general atlassian.sh. While these will still work on CLI 8.x, they are deprecated in favor of a newer approach described below that can take advantage of configuration properties. 


The CLI distribution now contains another start script that support Configuration properties. The script is acli.sh and works directly or can be customized. The script will work directly provided it is run from the installation directory. For example, if the installation directory is our your path. Other scenarios can be supported with some simple modifications to the script.

acli.sh



 Examples Using the ACLI Start Script

Cloud

Server

 Tips

Recommendations

While you can run the script directly from the installation directory as the following examples show, we recommend putting the directory on your path. Also copy or rename the shipped file to acli for easier typing. You can also use -a instead of --action to speed typing.

With these recommendations, the example becomes:





Getting Action Help

Help is available for any action directly from the command line. Online references are available for all clients: Action Reference.



 Advanced Enterprise Features

For companies with larger numbers of Cloud and Server instances that need to be accessed, the configuration support a number of features that enables enterprises level configuration and shared or centralized configurations.

  1. Variables - use variables to minimize duplication and ease maintenance

  2. Includes - include other configuration property files to allow shared configurations with user customized credentials or private server configurations

  3. Regular expression search - use regular expressions to match instance name patterns to a configuration to enable dynamic recognition of new sites and minimize configuration

  4. Shared configuration - file configuration can be easily shared via shared directories or repositories (important for CI build environments)

Example Enterprise Configuration

Example Include For User Level Configuration

Example Include for User Level Configuration



Log a request with our support team.

Confluence®, Jira®, Atlassian Bamboo®, Bitbucket®, Fisheye®, and Atlassian Crucible® are registered trademarks of Atlassian®
Copyright © 2005 - 2024 Appfire | All rights reserved. Appfire™, the 'Apps for makers™' slogan and Bob Swift Atlassian Apps™ are all trademarks of Appfire Technologies, LLC.