Connecting JIRA with CircleCI
This document describes how you can connect JIRA to your CircleCI builds. With the CircleCI JIRA plugin, you can display your build statuses in JIRA.
Note: You have to be an JIRA admin to install this plugin.
- Navigate to project settings and select
- Go to the Atlassian Marketplace to get the CircleCI JIRA Plugin
- Install the plugin and follow the prompts to set it up.
- Return to the CircleCI JIRA Integration settings page and add the generated token.
Viewing build and deploy statuses in Jira
With CircleCI orbs it is possible to display your build and deploy status in Jira Cloud. To do this, you will need to:
- Make sure you followed the steps above to connect Jira Cloud with CircleCI.
- Make sure that you are using version
2.1at the top of your
If you do not already have Pipelines enabled, you will need to go to
Advanced Settingsand turn it on.
- To get an API token for build information retrieval, go to User Settings > Tokens and create a token. Copy the token. (Note: older versions of the JIRA orb may require you to retrieve a Project API Token, which is accessible from Project Settings > API Permissions)
- To give the integration access to the key, go to Project Settings -> Environment Variables and add a variable named CIRCLE_TOKEN with the value being the token you just made.
- Add the Jira orb to your configuration and invoke it (see example below).
The example config below provides a bare
config.yml illustrating the use of the Jira Orb.
version: 2.1 orbs: # adds orbs to your configuration jira: firstname.lastname@example.org # invokes the Jira orb, making its commands accessible workflows: build: jobs: - build: post-steps: - jira/notify # Runs the Jira's "notify" commands after a build has finished its steps. jobs: build: docker: - image: 'cimg/base:stable' auth: username: mydockerhub-user password: $DOCKERHUB_PASSWORD # context / project UI env-var reference steps: - run: echo "hello"