Integrate your CI/CD pipeline's Build and Deployment information into the Jira Development Panel. Enable better
Only supports Jira Cloud. Does not support Jira Server (hosted)
Prerequisites
Generate Credentials
Generate new OAuth Credentials and copy
Use with Any CI/CD Provider
As long as your CI/CD provider supports running Docker images you may use this integration. Tested in Drone.io, Gitlab CI, and Google Cloud Run.
Docker Images are available from:
- Gitlab Container Registry:
registry.gitlab.com/rohit-gohri/jira-ci-cd-integration
- Github Container Registry:
ghcr.io/rohit-gohri/jira-ci-cd-integration
- Docker Hub:
boringdownload/jira-integration
Pick whatever you want and is convenient for you.
Set Env Vars
Configuration for the Docker image is through env vars. Read more in options.
Jira-Gitlab CI/CD
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-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
JIRA_INSTANCE: companyname
jira-integration-on-failure:
extends: jira-integration-on-success
when: on_failure
variables:
BUILD_STATE: failure
Jira-Drone.io Example
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
JIRA_INSTANCE: companyname
JIRA_CLIENT_ID:
from_secret: jira_client_id
JIRA_CLIENT_SECRET:
from_secret: jira_client_secret
Usage With Github Actions
You can also use this as a Github Action if you want to send release information to Jira.
Add OAuth Creds as secrets to Github
See: https://docs.github.com/en/actions/reference/encrypted-secrets
- Add Client ID as
JIRA_CLIENT_ID
- Add Client Secret as
JIRA_CLIENT_SECRET
Update Github Workflow
Use in Builds Pipeline
- name: Jira Integration
if: ${{ always() }}
uses: rohit-gohri/jira-ci-cd-integration@v0
with:
event_type: build
state: ${{ job.status }}
jira_instance: companyname # Subdomain for Jira Cloud
client_id: ${{ secrets.JIRA_CLIENT_ID }}
client_secret: ${{ secrets.JIRA_CLIENT_SECRET }}
Use in Deployment Pipeline
- name: Jira Integration
if: ${{ always() }}
uses: rohit-gohri/jira-ci-cd-integration@v0
with:
event_type: deployment
state: ${{ job.status }}
issue: JCI-3, JCI-6 # Comma separated list of issues being deployed/released. You are expected to generate this yourself in a previous step
jira_instance: companyname # Subdomain for Jira Cloud
client_id: ${{ secrets.JIRA_CLIENT_ID }}
client_secret: ${{ secrets.JIRA_CLIENT_SECRET }}
Top comments (0)