Configure webhooks in Harness manually
Configure webhooks manually in Harness to send pipeline notifications to DevOps Change Velocity.
Before you begin
- sn_devops.admin or sn_devops.tool_owner in DevOps Change Velocity
- Harness admin
Procedure
-
In DevOps Change Velocity, choose Configure manually when configuring the tool instance to send data.
Note:You can also access manual configuration from the Harness tool record in DevOps Change Velocity. From the tool record, select Configure manually.
-
Copy the Webhook URL and the other field values from DevOps Change Velocity connection details for Harness.
Note:Select Copy in the appropriate field to copy the value to your clipboard. The field label changes to Copied, but you can copy multiple times.
-
Modify the copied Webhook URL to reflect your tool details.
https://<your instance>.service-now.com/api/sn_devops/v2/devops/tool/{code | plan | artifact | orchestration | test | softwarequality }?toolId=<your ToolId>
- In <your instance>, enter the copied ServiceNow instance URL.
-
Select one of the tool capabilities {code | plan | artifact | orchestration | test | softwarequality } to match your tool.
For example:
https://demoinstance.service-now.com/api/sn_devops/v2/devops/tool/orchestration?toolId=<your ToolId>
-
In <your ToolId>, enter the copied tool ID.
For example:
https://demoinstance.service-now.com/api/sn_devops/v2/devops/tool/orchestration?toolId=ac0cif1a1b7696107940a864gjhgbcb58
-
Add the "&ni.nolog.token=<copied secret token>" parameter in the URL to pass the secret token.
For example:
https://demoinstance.service-now.com/api/sn_devops/v2/devops/tool/orchestration?toolId=ac0cdf1a1b7696107940a864gjhgbcb58&ni.nolog.token=brl1jhab63nn56
-
Add "&projectId=<project_sys_id>" in the URL to add the account identifier.
Note:For example:Project Id or Account Id is the unique identifier for your account in the Harness platform. Copy it from Account Settings of your Harness account.
https://demoinstance.service-now.com/api/sn_devops/v2/devops/tool/orchestration?toolId=ac0cdf1a1b7696107940a864gjhgbcb58&ni.nolog.token=brl1jhab63nn56&projectId=vH2s1ghNKNy6sEVSeTIK3w
-
In your Harness tool, select your pipeline, and then select the Notify option.
- Select +Notifications to create a new notification record.
-
Enter a name for the notification, and select Continue.
-
Select the following pipeline events, and then select Continue.
- Pipeline End
- Stage Failed
- Stage Success
- Stage Start
- Step Failed
-
Select the channel type as Webhook, and enter the URL to be configured (created in step3).
- Select Finish.