• Products
  • Documentation
  • Resources

Automate what build and deployment events are sent from Jenkins to Jira

This topic details an optional step in the process of connecting a Jenkins server to a Jira Cloud site using Jenkins for Jira. This step is not necessary to complete a connection and get data flowing, and relies on a good working knowledge of how Jenkins pipelines are made. Some teams may find it useful when setting up a connection to a Jenkins server running a large number of pipelines.

When using the Jenkins for Jira app to send build and deployment events from a Jenkins server to Jira, the Atlassian Jira Software Cloud plugin on your Jenkins server will look for explicit instructions in your server pipelines to send data to Jira. Specifically, it will look for these instructions in the Jenkinsfiles that define those pipelines.

These instructions are detailed in the set up guide generated in Jira when you connect to a Jenkins server.

In addition, when setting up the Atlassian Jira Software Cloud plugin on your Jenkins server, a Jenkins admin can opt to enable the following advanced options:

  • Send builds automatically

  • Send deployments automatically

When these options are selected, the Atlassian Jira Software Cloud plugin will look for explicit instructions in your pipelines Jenkinsfiles, as well as particular naming conventions for build and deployment stages in those. If it finds either of these, it will send data to connected Jira 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?

  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

  • 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'), 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

Additional Help