Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Summary

This assumes you are using atlassian-cli distribution which is the only one available for current releases of the CLI. The atlassian script is a more powerful script to use in place of product specific scripts (like jira.sh and confluence.sh) and provides a consistent way to access multiple CLIs and servers.

Tip

This is a Best Practice for any advanced use cases.

Customization Steps


StepDescription
1Find the example script
  • Look for an example atlassian.bat (Windows) or atlassian.sh (Linux, OSX) in the CLI installation directory 
2Open in an editor
  • See the comments for customization instructions
3Add an entry for each Atlassian server or CLI you want to use
  • Use the entry that specific to the server product
  • Name it something convenient for you to remember - usually the same as the instance is normally referred to in your organization
4

Optional

  • Consider adding the installation directory to your path
  • Makes it easier to use
5

Optional for Linux or OSX


  • Copy or rename atlassian.sh to atlassian

Tip
titleBest Practice

This is what we follow internally to minimize maintenance for upgrades:

  • Follow the CLI installation naming convention as indicated in the example script
  • Put your customized atlassian script in a directory on your path
  • Put a soft link to the atlassian script in each CLI installation directory
    • This makes it possible to extract the correct CLI version for your script automatically

Alternative

  • Make sure the current directory (.) is on your path
  • On upgrades, copy the atlassian file to the new installation
    • Edit the file and find/replace the version if necessary
6Use


No Format
titleExamples
atlassian my-jira --action getServerInfo
atlassian my-confluence --action getServerInfo
atlassian my-bamboo --action getServerInfo
atlassian my-stash --action getServerInfo