Use case: Release version after the release build

Automatically create a new version in Jira when ever a release build successfully completes.

The Rule

After you installed the app, you are ready to configure your first Rule.

  • From the top navigation in Jira, choose Gear Icon > Manage Apps.
  • Choose Jenkins Integration > Automation and click on the Add Rule button.
  • Specify a meaningful name, like Release new Version.
  • Select Build Synchronized as the event that triggers the rule and click Add.
  • Select Create Version action, and click Add.
  • Select the project to create the version in.
  • Specify the name of the version
    Release [[build.number]]
    
  • Optionally specify a description for the version.
  • Optionally specify a start date for the version.
  • Specify the release date (warning) today in the expression below refers to the day the rule is executed and not the day the rule is created, see Expression Values.
    [[#today]]
    
  • Check Released to indicated that the new version is Jira should be marked as released.
  • Select Linked to a Build as the issue selector method.
  • Next we need to make the action conditional by adding the Build with Result condition. To do this, click on more options button ... to add a condition.
  • Select the Build with Result condition and click on add.
  • Select equal to as the operand.
  • Select success as the expected build result.
  • Next we need to limit the scope of the release job by adding the Build of Job condition. To do this, click on the + button below the Build with Result condition.
  • Select the Build of Job condition and click add.
  • Select the release job(s) that should create a new version, In this example its test.
  • You should have a rule that looks similar to the one in screenshot below.
  • Click on Save to store and activate the rule.
Use case: Release version after the release build

Previous: Use case: Create issue for failing builds
Next: Use case: Transition issue when work starts
Jenkins Integration for Jira

Didn’t find what you were looking for?