Integrate your CI/CD pipeline's Build and Deployment information into the Jira Development Panel.
Only supports Jira Cloud. Does not support Jira Server (hosted)
Generate new OAuth Credentials and copy
Supported in providers which support running arbitrary Docker images (like Drone, Gitlab CI).
Docker Images are available from:
- Docker Hub:
boringdownload/jira-integration
- Github Container Registry:
ghcr.io/rohit-gohri/jira-ci-cd-integration
- Gitlab Container Registry:
registry.gitlab.com/rohit-gohri/jira-ci-cd-integration
Pick whatever you want and is convenient for you.
Configuration for the Docker image is through env vars. Read more in options.
Add secrets for JIRA_CLIENT_ID
and JIRA_CLIENT_SECRET
and then add this to your pipeline:
steps:
- name: jira-integration
image: boringdownload/jira-integration:v0
environment:
BUILD_NAME: drone-pipeline # or give any custom name
JIRA_INSTANCE: companyname
JIRA_CLIENT_ID:
from_secret: jira_client_id
JIRA_CLIENT_SECRET:
from_secret: jira_client_secret
To send deployment information just promote the build and it will send a deployment info.
Add a CI/CD Variable to your project for JIRA_CLIENT_ID
and JIRA_CLIENT_SECRET
(remember to mask them) and then add these steps to your pipeline (we use .post
stage so it runs last)
jira-build-integration-on-success:
stage: .post
when: on_success
image: registry.gitlab.com/rohit-gohri/jira-ci-cd-integration:v0
script: jira-integration
variables:
BUILD_STATE: successful
BUILD_NAME: gitlab-pipeline-name # or give any custom name
JIRA_INSTANCE: companyname
jira-build-integration-on-failure:
extends: jira-build-integration-on-success
when: on_failure
variables:
BUILD_STATE: failure
If you provide an environment block it will send a deployment event instead of build event.
jira-deploy-integration-on-success:
extends: jira-build-integration-on-success
environment:
name: production
jira-deploy-integration-on-failure:
extends: jira-build-integration-on-failure
environment:
name: production
See: https://docs.github.com/en/actions/reference/encrypted-secrets
- Add Client ID as
JIRA_CLIENT_ID
- Add Client Secret as
JIRA_CLIENT_SECRET
- name: Jira Integration
if: ${{ always() }}
uses: rohit-gohri/jira-ci-cd-integration@v0
with:
state: ${{ job.status }}
jira_instance: companyname # Subdomain for Jira Cloud
client_id: ${{ secrets.JIRA_CLIENT_ID }}
client_secret: ${{ secrets.JIRA_CLIENT_SECRET }}
Just provide an evironment to send a deployment event instead of a build event.
- name: Jira Integration
if: ${{ always() }}
uses: rohit-gohri/jira-ci-cd-integration@v0
with:
state: ${{ job.status }}
environment: staging
issue: JCI-3, JCI-6 # Comma separated list of issues being deployed/released. You are expected to generate this yourself in a previous step for releases
jira_instance: companyname # Subdomain for Jira Cloud
client_id: ${{ secrets.JIRA_CLIENT_ID }}
client_secret: ${{ secrets.JIRA_CLIENT_SECRET }}
Provide these options via environment variables, or directly in case of Github Actions.
Sub Domain of Jira Cloud Instance. This part of the url: https://<jira_instance>.atlassian.net
ClientID of OAuth Creds
Client Secret of OAuth Creds
"build" or "deployment", (default is "build"). You can override this manually or just provide an evironment
to send a deployment event instead of a build event.
"successful"/"success", "failed", or "canceled" (default is "successful").
We try to detect this via env-ci for most CI/CD providers, but you can manually override it if you wish to do so.
Will be parsed from branch name automatically if available. Or you can provide it according to your own logic. Can be multiple comma separated issues.
We try to detect this via env-ci for most CI/CD providers, but you can manually override it if you wish to do so.
If the tool can't detect your commit message you may provide a value directly. If you have the jira id in the commit message, it will be parsed.
A custom name for your pipeline
NOTE: Only for Deployment events
A name for your environment. The tool tries to automatically infer this from your CI/CD provider.
NOTE: Automatically inferred from environment name
The tool tries to automatically parse this from environment but if you want to override then provide one of (unmapped
, development
, testing
, staging
, production
)
Feel free to open issues/Pull Requests to add support for some CI provider that doesn't have support yet.