Jira Approvals
You can use Jira to approve or reject a Workflow or Pipeline step.
In your Harness Workflow or Pipeline, you define a Jira ticket and approval and rejection criteria. During deployment, a Jira ticket is created and its approval/rejection determines if the Pipeline (and Workflow) deployment may proceed. For details on integrating Jira with Harness, see Jira Integration.
The other approval mechanisms are:
Before You Begin
Step: Add an Approval Step
In your Pipeline, in Pipeline Stages, click +. The following settings appear.
Select Approval Step.
Select Jira in the Ticketing System.
Select the Jira account in Jira Connector that you want to use by selecting the Collaboration Provider you added for the account. For more information, see Add Jira Collaboration Provider.
Select the Jira Project containing the Jira issue you want to use for approval. You can enter text and expressions together.
Enter the Key/Issue ID. It is the output variable for a Jira issue created in a Workflow, for example
${Jiravar.issueId}
. You can enter the Jira Key/Issue ID for any Jira issue in the Jira project. You can also enter text and expressions together.Enter the time duration in Timeout that Harness should wait for the approval or rejection before failing the deployment. You can use
**w**
for week,**d**
for day,**h**
for hour,**m**
for minutes,**s**
for seconds and**ms**
for milliseconds. For example, 1d for one day.The maximum is 3w 3d 20h 30m.Enter a value for approving the Pipeline. You can select a status from the Approved Pipeline if Jira Status is drop-down list or enter an expression. You can enter text and expressions together.
Enter a value for rejecting the Pipeline. You can select a status from the Rejected Pipeline if Jira Status is drop-down list or enter an expression. You can enter text and expressions together.
Select Execute in Parallel with Previous Step checkbox to execute the steps in parallel.
Select either Do not skip or Skip always for setting the skip option. For more information, see Skip Execution.
Click Submit.
Deploy your Pipeline and go to the Deployments page. The Approval Stage displays the following information:
- Message: The "Message" appears only when the stage of a Pipeline is completed, and there is no action pending from the user or system. It displays the completed status of the process. For example, approval provided, approval rejected, or Pipeline aborted.
- Started At: The time at which the Pipeline was triggered.
- Ended At: The time at which the system or a user completed the approval process.
- Issue URL: Link to the Jira issue.
- Timeout: The time duration that Harness should wait for the approval or rejection before killing the deployment process.
- Triggered By: The user who triggered the Pipeline deployment. It can be triggered using a Pipeline or Trigger process.
- Approval Criteria: Criterion set for approving the request.
- Current Value: Current status of Jira issue.
- Rejection Criteria: Criterion set for rejecting the request.
You can click on the Issue URL link to see the Jira issue in Jira's UI and select set approval or rejection criteria. In this example, the status Done fulfills the Approval Criteria.
Once the Jira issue is approved, the Approval stage turns green in Deployments, and the deployment continues.