You can use ServiceNow to approve or reject a Workflow or Pipeline step.
In your Harness Workflow or Pipeline, you define a ServiceNow ticket and the approval and rejection criteria. During deployment, a ServiceNow ticket is created and its approval/rejection determines if the Pipeline (and Workflow) deployment may proceed. For details on integrating ServiceNow with Harness, see ServiceNow 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 ServiceNow in the Ticketing System.
- Select the ServiceNow account in ServiceNow Connector that you want to use by selecting the Collaboration Provider you added for the account, as described in Add ServiceNow as a Collaboration Provider. Use the same provider you used to create the ticket in the Workflow.
- Select the ServiceNow Ticket Type from the drop-down list. Use the same type as the ticket you created in the Workflow.
- Enter the Issue Number. It is an output variable for a ServiceNow issue created in a Workflow, such as
- Enter the time duration in Timeout that Harness should wait for the approval or rejection before failing the deployment. You can use
sfor seconds and
msfor milliseconds. For example, 1d for one day.
- Define the Approved Status Criteria using the ServiceNow status items.
- Define the Rejected Status Criteria using the ServiceNow status items.
- 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.
- 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 ServiceNow ticket.