Summary
If you have more than one Atlassian server to connect to This assumes you are using the using atlassian-cli distribution (recommended!), then you have a much more powerful start script called atlassian (.sh or .bat) that can be customized to make it easier to access all of your 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
...
autoNumber | true |
---|
enableSorting | false |
---|
| Step | Description |
---|
1 | Find the example script | - Look for an example atlassian.bat (Windows) or atlassian.sh (Linux, OSX) in the CLI installation directory
|
2 | Open in an editor | - See the comments for customization instructions
|
3 | Add 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
| |
5 | Optional for Linux or OSX
| - Copy or rename atlassian.sh to atlassian
Tip |
---|
| 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
|
6 | Use |
No Format |
---|
| atlassian my-jira --action getServerInfo
atlassian my-confluence --action getServerInfo
atlassian my-bamboo --action getServerInfo
atlassian my-stash --action getServerInfo |
|