ServiceNow Change Management ExtensionServiceNow is a software-as-a-service (SaaS) provider of IT service management (ITSM) software, including change management. Specific change management subprocesses include change risk assessment, change scheduling, change approvals and oversight. With change management, your organization can reduce the risks associated with change, while speeding up the deployments with Azure Pipelines. This extension enables integration of ServiceNow Change Management with Azure Pipelines.
For designer release pipelines, it includes -
For YAML pipelines, it includes -
The deployment process in Azure Pipelines helps automate the deployment and complement the controls offered by ServiceNow. UsageInstall Azure Pipelines app on ServiceNowIntegration requires the Azure Pipelines application to be installed on the ServiceNow instance. Create users and accounts in ServiceNowFor the two services to communicate, a service/user account in ServiceNow must be granted the In case you wish to use OAuth for communication between services, Azure DevOps should be registered in ServiceNow as an OAuth app. Learn more. Create service connection for ServiceNow in Azure PipelinesService connection in Azure DevOps store the connection details for external services. The connection details are securely passed to tasks and gates during execution, enabling communication with the services. ServiceNow service connection supports two authentication types - Basic authentication and OAuth2. Learn more about authentication schemes.
Basic authenticationThis needs a service account (user) to be created in ServiceNow. Provide username and password for the service account configured for basic auth.
OAuth2 authenticationIn addition to granting role to a user in ServiceNow, Azure DevOps should be registered in ServiceNow as an OAuth app. Register your OAuth configuration in Azure DevOps Services
Create OAuth service connection for ServiceNowUse the OAuth configuration created above and provide the ServiceNow instance Url. Configure a designer release pipeline for ServiceNow Change ManagementConfigure a release gate
Gate can be configured to create a new change request for every run of the pipeline or use an existing request. Inputs provided in the gate are used as properties for the new change request in ServiceNow, if applicable. Inputs for Gate:
Additional properties can be set in the created change request using the following inputs. Note: Available inputs change based on the selected change type.
Gate Success Criteria :
Gate Output Variables :
Add a task to update the change requestInputs for Update change request task:
Configure yaml pipelines for ServiceNow Change ManagementConfigure a check on a resource for ServiceNow Change ManagementYAML Pipelines rely on resources such as environments, service connections, agent pools, variable groups, and secure files. Checks enable the resource owner to control if and when a stage in any pipeline can consume a resource. As an owner of a resource, you can specify that ServiceNow change management must complete before a stage consuming that resource can start. Example: We’re configuring the check on Environment named “Latest”. The check configuration details remain the same as the gate in designer release pipelines. Refer to this. Add the task to update change request in the YAML PipelineIn a server job, add the update change request task to send work notes etc. to ServiceNow. For example, in the YAML pipeline below, the environment “Latest” has a check configured on it which creates a Change Request, our server task identifies the same and updates it. Change request number is optional in the YAML Server task. If not specified, then the task tries to update the change created by a check on that stage. The resulting pipeline for the above pipeline shall be as follows. NoteServiceNow also offers an advanced integration with Azure DevOps as a licensed product. The advanced integration includes connectivity goes beyond the pipeline integration to include Azure Boards, Azure Repos, Azure Test Plans and Azure Artifacts. The licensed product provides a DevOps data model connected to ServiceNow’s Service Graph and advanced reporting and auditing of key metrics. Find out more here. For all support and feedbacks on the change management extension or the advanced integration, use contact us from https://your.servicenow.com/microsoft/devops-1cdf. FAQsHow to register Azure DevOps in ServiceNow as an OAuth AppIf you plan to use OAuth to connect to your ServiceNow instance from Azure DevOps account, you first need to register the Azure DevOps as an OAuth app in ServiceNow. For details see Creating an endpoint for clients to acccess the ServiceNow instance.
Debugging advanced success criteria expression specified in gate
Steps to add mapping for custom fields in Import set transform map :In order to insert custom fields for a change request (using additional change request parameters), please add mapping of the custom fields in import set transform map by following below steps:Adding custom fields in import set table:
Add mapping in Transform map
Click Update Field mapping added |