Ever wanted to get build and deployment links directly in Jira? Now you can, just add this small step to the last stage of your pipeline and get all the relevant information right in the ticket details page.

Generate Credentials for OAuth App
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 Build.
Docker Images are available from:
- Github Container Registry:
ghcr.io/rohit-gohri/jira-ci-cd-integration - Gitlab Container Registry:
registry.gitlab.com/rohit-gohri/jira-ci-cd-integration - Docker Hub:
boringdownload/jira-integration
Pick whatever you want and is convenient for you.
Configuration is through Environment Variables. Read more in the repository Readme.
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
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
Usage With Github Actions
You can also use this as a Github Action if you want to send release information to Jira.
First 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

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 }}
Result
That's all it takes. You'll get Builds information like you do for Branches and Pull Requests:

Source
You can find the source on Github: