Atlassian CLI let's you automate the integration of code changes from multiple contributors into a single software project with CI. It’s a primary DevOps best practice, allowing developers to frequently merge code changes into a central repository where builds and tests then run. Automated tools are used to assert the new code’s correctness before integration.
Create a file called install-acli.sh
with the following information:
1 2#!/bin/bash set -euo pipefail # Download the latest release. curl -LO "https://acli.atlassian.com/linux/latest/acli_linux_amd64/acli" # Make the acli binary executable. chmod +x ./acli # You can now use acli from this directory. ./acli --help
Add the following to your CI configuration file to run the script:
1 2image: atlassian/default-image:3 pipelines: default: - step: name: 'Install Atlassian CLI' script: - bash examples/install-acli.sh
To authenticate to the Atlassian CLI, you can use a bot account with API token. Define secret variables in your CI configuration with the name BOT_API_TOKEN
and use the following command to authenticate:
1 2echo "$BOT_API_TOKEN" | ./acli jira auth login --email bot@atlassian.com --site hello.atlassian.com --token
Rate this page: