Create Service Now Tickets in CD Stages
SERVICENOW_CREATE_UPDATE_NG. Contact Harness Support to enable the feature.
You can add the Create ServiceNow step to a Harness CD stage or an Approval stage and do the following:
- Automatically create change requests in ServiceNow to track updates to your build, test, and production environments by adding a ServiceNow Create step in your Pipeline.
- Automatically create and assign tickets in ServiceNow to triage and resolve incidents quickly in case of Pipeline failures.
Before You Begin
- Connect to ServiceNow: you can add a Harness ServiceNow Connector before or during the Create ServiceNow step setup.
- Make sure you have a ServiceNow account with
itilrole to create and modify tickets. For more information, see Base system roles.
- You must install the Harness Application before using templates to create ServiceNow tickets.
- While it's not a strict limitation, some users can forget that when you use a ServiceNow Create step, it creates a new, independent ServiceNow ticket every time it is run (as opposed to updating the same issue).
It is important to remember that you should only add ServiceNow Create to a stage if you want to create a new ServiceNow ticket on every run of the stage.
Step 1: Add a ServiceNow Create Step
In a Harness CD or Approval stage, in Execution, click Add Step.
Click ServiceNow Create. The ServiceNow Create settings appear.
In Name, enter a name that describes the step.
In Timeout, enter how long you want Harness to try to create the issue before failing (and initiating the stage or step Failure Strategy).
In ServiceNow Connector, create or select the ServiceNow Connector to use.
In Ticket Type, select a ServiceNow ticket type from the list.
Option: Configure Fields
Select Configure Fields to select or add ServiceNow Fields to your ServiceNow ticket. This option enables you to access multiple custom fields from your ServiceNow integration.
In Description, add the ticket description.
In Short Description, enter a description of the ticket you are creating. This will be the title of the ticket.
You can use Harness variables in the Short Description and Description fields.
Click Fields. The Add ServiceNow Fields settings appear.
Select Provide Field List to add custom fields.
Enter Key for the field.
In Value, you can write static values, or variables, to these fields. Click Add.
Once you are done, this is how the dialog looks:
Option: Create From Template
Select Create From Template to create a ticket using an existing template.
In Template Name, you can either enter the name of an existing template or provide an expression.
Click Apply Changes.
Your ServiceNow ticket is now added to your Pipeline.