You are on page 1of 6

4/4/24, 17:52 Automate what build and deployment events are sent from Jenkins to Jira | Jira Software

to Jira | Jira Software Cloud | Atlassian Support

Jira Software Support Documentation Resources


Contact Log in

Atlassian Support / Jira Software / Resources / Cloud


Set up Jira Software … Data Center

Automate what build and


deployment events are sent from
Jenkins to Jira

https://support.atlassian.com/jira-software-cloud/docs/setup-decisions-necessary-when-connecting-jenkins-to-jira-software-cloud/ 1/6
4/4/24, 17:52 Automate what build and deployment events are sent from Jenkins to Jira | Jira Software Cloud | Atlassian Support

This topic details an optional step in the process of Set up Jira Software
connecting a Jenkins server to a Jira Cloud site using Cloud
Jenkins for Jira. This step is not necessary to complete a Learn how Jira products
connection and get data flowing, and relies on a good work
working knowledge of how Jenkins pipelines are made. Use Jira Cloud with
Some teams may find it useful when setting up a other Atlassian products
connection to a Jenkins server running a large number of Use Jira Cloud with
pipelines. other applications
When using the Jenkins for Jira app to send build and Automate what build
deployment events from a Jenkins server to Jira, the and deployment events
Atlassian Jira Software Cloud plugin on your Jenkins server are sent from Jenkins
will look for explicit instructions in your server pipelines to to Jira
send data to Jira. Specifically, it will look for these
instructions in the Jenkinsfiles that define those pipelines.
On this page
These instructions are detailed in the set up guide Is automation
generated in Jira when you connect to a Jenkins server. appropriate for your
In addition, when setting up the Atlassian Jira Software team?
Cloud plugin on your Jenkins server, a Jenkins admin can Setup options
opt to enable the following advanced options: Send build data
Send builds automatically automatically
Send deployments automatically Send deployment data
When these options are selected, the Atlassian Jira automatically
Software Cloud plugin will look for explicit instructions in
your pipelines Jenkinsfiles, as well as particular naming Community
conventions for build and deployment stages in those. If it Questions, discussions,
finds either of these, it will send data to connected Jira and articles
sites. For more information see How Jenkins for Jira works.

Is automation appropriate for your team?


Some teams, which use a consistent naming convention for
build and deployment stages when writing their
Jenkinsfiles, may find using stage names more convenient
that writing specific instructions into each build and
deployment stage, especially if their Jira projects utilize a
large number of Jenkins pipelines.
To find out if this is an appropriate option for your team,
reach out to your developers and ask:
1. Who maintains the Jenkinsfiles relevant to each Jira
project?
https://support.atlassian.com/jira-software-cloud/docs/setup-decisions-necessary-when-connecting-jenkins-to-jira-software-cloud/ 2/6
4/4/24, 17:52 Automate what build and deployment events are sent from Jenkins to Jira | Jira Software Cloud | Atlassian Support

2. Does your team want:


Granular control of each pipeline that sends data to
Jira, or
Jenkins to send build and deployment updates to
Jira every time it runs a pipeline.
Once you know who maintains the Jenkinsfiles for each
Jira project, ask those team members:
1. When writing Jenkinsfiles, do you have a consistent
naming structure for build and deployment stages?
For example:
Are all build stages named stage('build')?
Are all deployment stages named
stage('deploy to staging' ), stage('deploy

to prod' ), and so on

2. If so, what are those naming structures?

Setup options

Depending on your team’s answers to the questions above,


here’s whether enabling these options is appropriate to
your team:
Send build data automatically
This setting covers how Jenkins sends build events to Jira.
Based on how your team uses Jenkins, here’s what to
select:

If your team:
1. Wants Jenkins to send build updates to Jira
every time it runs a pipeline.
2. Has a consistent naming structure for build
stages when writing Jenkinsfiles.
For example, if every build stage is called
stage('build')

You or your Jenkins admin should:


Enable this option
https://support.atlassian.com/jira-software-cloud/docs/setup-decisions-necessary-when-connecting-jenkins-to-jira-software-cloud/ 3/6
4/4/24, 17:52 Automate what build and deployment events are sent from Jenkins to Jira | Jira Software Cloud | Atlassian Support

Enter a regular expression filter matching your


team’s build stage name structure
For example:
If every build stage is called
stage('build')

Enter the regular expression ^build$

If your team:
1. Want Jenkins to send build and deployment
updates to Jira every time it runs a pipeline.
2. Do not have a consistent naming structure for
build stages when writing Jenkinsfiles.
You or your Jenkins admin should:
Enable this option
Leave the regular expression filter field empty

If your team:
1. Want granular control of each pipeline that
sends data to Jira
You or your Jenkins admin should:
Disable this option

Send deployment data automatically


This setting covers how Jenkins sends deployment events
to Jira.
Based on how your team uses Jenkins, here’s what to tell
your Jenkins admin:

If your team:
1. Have a consistent naming structure for
deployment stages when writing Jenkinsfiles.
For example, if every deployment stage is
called stage('deploy to staging') ,
https://support.atlassian.com/jira-software-cloud/docs/setup-decisions-necessary-when-connecting-jenkins-to-jira-software-cloud/ 4/6
4/4/24, 17:52 Automate what build and deployment events are sent from Jenkins to Jira | Jira Software Cloud | Atlassian Support

stage('deploy to prod') , and so on


2. Want every pipeline to send deployment data to
Jira
You or your Jenkins admin should:
1. Enable this option
2. Enter a regular expression filter matching the
names your teams use for deployment stages
For example:
If every deployment stage is called
stage('deploy to staging') ,

stage('deploy to prod') , and so on

Enter the regular expression ^deploy


to (?<envName>.*)$

Use (?<envName>.*) in place of


specific stage names like ‘staging'
or ‘prod’ to let Jenkins extract
environment names and display
these in Jira

If your team:
Does not have a consistent naming structure
for deployment stages when writing
Jenkinsfiles, or
Want granular control of each pipeline that
sends data to Jira
You or your Jenkins admin should:
Disable this option

Was this Provide feedback about


helpful? Yes No
this article

Additional Help
Ask the Community

https://support.atlassian.com/jira-software-cloud/docs/setup-decisions-necessary-when-connecting-jenkins-to-jira-software-cloud/ 5/6
4/4/24, 17:52 Automate what build and deployment events are sent from Jenkins to Jira | Jira Software Cloud | Atlassian Support

Notice at Collection Privacy Policy Terms of Use Security


©2024 Atlassian

https://support.atlassian.com/jira-software-cloud/docs/setup-decisions-necessary-when-connecting-jenkins-to-jira-software-cloud/ 6/6

You might also like