JIRA

Jira's API-driven architecture enables us to perform various actions on Jira using REST APIs. So, using Spinnaker's custom stage, tickets can be validated or updated and proceed with future actions in the pipeline.

Add and Configure JIRA:

  • Add JIRA as an Integration to the ISD system: Refer to this page to know how to add an Integration.

  • Configure visibility for JIRA integrator: Refer to this page to know how to configure the visibility JIRA integrator.

  • Sync CD accounts: Click the "Sync CD accounts" button to sync all the integrations with the Spinnaker. Refer to this page to know how to sync CD accounts.

After completing the above three steps, users can add the JIRA’s custom stage into your pipeline. JIRA custom stage consists of the following five Stages:

Refer to the below sections to configure each stage into your pipeline.

JIRA: Wait for state-OpsMx

The stage that waits for a specific state on a Jira issue. Provide the Jira id and specify the retry state until the desired state is occupied. Below is a use case that indicates the state will be polling until the state is changed to the “In Verification".

To add “JIRA: Wait for state-OpsMx” stage to your pipeline follow the steps below:

  1. Go to your application and click “Pipeline builder” and click “Add Stage” and then select “JIRA: Wait for state-OpsMx” stage from the drop-down menu as shown below.

2. Now the configuration screen appears to provide the required parameters.

Enter the following parameters on the above configuration screen:

  • Fail Fast HTTP Statuses: Comma-separated HTTP status codes (4xx or 5xx) that will cause this webhook stage to fail without retrying.

  • JIRA Canceled States: Specify the state that can cancel the running pipeline on a particular status of the issue.

  • JIRA Issue ID: Provide the ID of the issue.

  • JIRA Retry States: Define a state to retry the status of the issue.

  • JIRA Success States: Define a state that is to be succeeded (when the issue state is modified to a defined state it succeeds).

  • JIRA Termination States: JIRA issue states that terminate the pipeline. For example, PR Raised, etc.

  • Delay before monitoring: Optional delay (in seconds) to wait before starting to poll the endpoint for monitoring status.

  • Retry HTTP Statuses: Normally, webhook stages only retry on 429 and 5xx status codes. You can specify additional status codes here that will cause the monitor to retry (for example, 404, 418).

  • Signal on cancellation: Triggers a specific webhook if this stage is cancelled by the user or due to pipeline failure.

JIRA: Create an issue-OpsMx

Create an issue from the stage by providing the details with the priority to the specific project with the detailed information in the summary field. To add “JIRA: Create an issue-OpsMx” stage to your pipeline follow the steps below:

  1. Go to your application and click “Pipeline builder” and click “Add Stage” and then select “JIRA: Create an issue-OpsMx” stage from the drop-down menu as shown below.

2. Now the configuration screen appears to provide the required parameters.

Enter the following parameters on the above configuration screen:

  • Fail Fast HTTP Statuses: Comma-separated HTTP status codes (4xx or 5xx) that will cause this webhook stage to fail without retrying.

  • Description: Detailed description of the issue.

  • Issue Type ("Improvement", "Task", "New Feature", or "Bug"): Issue that can be specific to the type.

  • Project ID ("ENG" or "DOCS"): Project ID depends on the organization that has a specific definition for the project.

  • Issue Summary: Summary of the issue.

  • Wait for completion:

    • If the check box is not selected: Consider the stage that is succeeded if the webhook returns an HTTP status code 2xx, otherwise it is considered as failed.

    • If the check box is selected: It will poll a status URL to determine the progress of the stage with the specific response in the JSON.

JIRA: Comment on issue-OpsMx

An issue is to be commented based on previous stage status with build and deployment as a comment to the issue is provided using the stage. To add “JIRA: Comment on issue-OpsMx” stage to your pipeline follow the steps below:

  1. Go to your application and click “Pipeline builder” and click “Add Stage” and then select “JIRA: Comment on issue-OpsMx” stage from the drop-down menu as shown below.

2. Now the configuration screen appears to provide the required parameters.

Enter the following parameters on the above configuration screen:

  • Fail Fast HTTP Statuses: Comma-separated HTTP status codes (4xx or 5xx) that will cause this webhook stage to fail without retrying.

  • Issue ID: JIRA ID of the issue.

  • Message: Comment on the issue.

  • Wait for completion:

    • If the check box is not selected: Consider the stage that is succeeded if the webhook returns an HTTP status code 2xx, otherwise it is considered as failed.

    • If the check box is selected: It will poll a status URL to determine the progress of the stage with the specific response in the JSON.

JIRA: Update issue-OpsMx

Update an issue which is already been created. To add “JIRA: Update issue-OpsMx” stage to your pipeline follow the steps below:

  1. Go to your application and click “Pipeline builder” and click “Add Stage” and then select “JIRA: Update issue-OpsMx” stage from the drop-down menu as shown below.

2. Now the configuration screen appears to provide the required parameters.

Enter the following parameters on the above configuration screen:

  • Fail Fast HTTP Statuses: Comma-separated HTTP status codes (4xx or 5xx) that will cause this webhook stage to fail without retrying.

  • Description: Detailed description of the request.

  • Issue ID: JIRA ID of the issue.

  • Summary: Subject of the issue.

  • Wait for completion:

    • If the check box is not selected: Consider the stage that is succeeded if the webhook returns an HTTP status code 2xx, otherwise it is considered as failed.

    • If the check box is selected: It will poll a status URL to determine the progress of the stage with the specific response in the JSON.

JIRA: Transition issue-OpsMx

Change the state of an issue to a higher or lower state by providing the issue id and state. To add “JIRA: Transition issue-OpsMx” stage to your pipeline follow the steps below:

  1. Go to your application and click “Pipeline builder” and click “Add Stage” and then select “JIRA: Transition issue-OpsMx” stage from the drop-down menu as shown below.

2. Now the configuration screen appears to provide the required parameters.

Enter the following parameters on the above configuration screen:

  • Fail Fast HTTP Statuses: Comma-separated HTTP status codes (4xx or 5xx) that will cause this webhook stage to fail without retrying.

  • Issue ID: JIRA ID of the issue.

  • Target Stage ID: Target Stage ID depends on the organization's architecture (11 is "To Do", 21 is "In Progress", 31 is "In Review", 41 is "Done").

  • Wait for completion:

    • If the check box is not selected: Consider the stage that is succeeded if the webhook returns an HTTP status code 2xx, otherwise it is considered as failed.

    • If the check box is selected: It will poll a status URL to determine the progress of the stage with the specific response in the JSON.

Last updated