Freshservice DevOps Extension for Azure DevOps PipelineIntroductionThe Freshservice DevOps extension for Azure DevOps Pipelines enables seamless integration between Azure DevOps and Freshservice. This extension provides comprehensive support for change management within your CI/CD pipelines by allowing you to create a change in FS, associate a pipeline run to a change, and gate pipeline runs based on a Freshservice Change. Features and Use Cases
Create a ChangeThe extension allows users to create a change record in Freshservice from both Server Tasks and Agent Tasks within an Azure DevOps Pipeline Build. This task also associates the current pipeline run with the newly created Freshservice change, ensuring traceability and alignment between development and IT operations. Example Use Case: A developer triggers a build that automatically creates a change request in Freshservice, documenting the deployment for ITSM purposes. Update a ChangeThe Freshservice Change Update for Azure DevOps extension allows users to update a change record in Freshservice directly from an Agent Task within an Azure DevOps Pipeline Build. This ensures seamless traceability by linking the current pipeline run with the updated Freshservice change. By integrating development workflows with IT change management, this extension improves visibility and alignment between DevOps and IT operations. Example Use Case: A development team uses Azure DevOps for CI/CD and Freshservice for IT change management. When a pipeline build is triggered for a new software release, the extension automatically updates a related change record in Freshservice. This update includes deployment details, pipeline execution status, and any related approvals, ensuring compliance and transparency between development and IT teams. Associate Pipeline Run to a ChangeIf a change already exists in Freshservice, users can associate the current pipeline run with this existing change by providing the ChangeId. This feature is available for both Agent and Server Tasks, enhancing the flexibility of your DevOps and Change management. Example Use Case: An IT admin associates a pipeline run with an existing change that was created manually or via another automation process, ensuring the deployment aligns with change management policies. Add Note to a ChangeThe Freshservice Add Note to Change extension allows users to add a note to a Freshservice change record directly from an Agent Task within an Azure DevOps Pipeline Build. This enhances traceability by logging deployment details, approvals, or status updates, ensuring seamless communication between development and IT operations. Example Use Case: A DevOps engineer triggers a pipeline to deploy a new release. As part of the process, the pipeline automatically adds a note to the associated Freshservice change record, documenting key details like build status, deployment summary, and any necessary approvals. This keeps IT teams informed and maintains a clear audit trail. Using Variables for ChangeIdAzure DevOps allows the use of variables to make pipeline configurations more dynamic and reusable. You can pass the ChangeId as a variable when running the pipeline, which can then be referenced in the task configuration. Steps to Use Variables for ChangeId:
Example Use Case: A release manager sets the ChangeId as a variable to dynamically associate different pipeline runs with different Freshservice changes based on the deployment environment or release schedule. Note: The ChangeId variable should be defined and passed correctly to ensure the task functions as expected. Gate a Pipeline Run using Freshservice ChangeThis feature enables gating of pipeline runs based on the status of a Freshservice change. By configuring a gating task in the Approvals and Checks of an Environment, users can specify a desired status for the change. The pipeline will proceed only if the change reaches the specified status, providing robust control over deployment workflows. Example Use Case: A release manager configures a pipeline to proceed only if the associated change request is approved and marked as "Implemented," preventing unapproved changes from being deployed. Installation and ConfigurationPrerequisites
Installation Steps
Configuration in Azure DevOps
Setting Up Service ConnectionsBefore using the Freshservice DevOps tasks, you need to configure a service connection in Azure DevOps to connect to your Freshservice account. This service connection will be used by the tasks to authenticate and interact with Freshservice. Creating a Freshservice Service Connection
Figure 2: Creating a Freshservice Service Connection in Azure DevOps Using the Service ConnectionWhen configuring tasks in your pipeline, select the Freshservice DevOps service connection from the dropdown to use it for authentication and interaction with Freshservice. Usage GuideCreating a Change
Updating a Change
Associating a Pipeline Run to a Change
Add Note To a Change
Configuring Gating Tasks
Tips and Advanced UsageUsing Variable Libraries with Gating TasksIn Azure DevOps, variables defined within a YAML pipeline are not accessible in Gating Tasks configured in the Approvals and Checks of an environment. To bridge this gap, you can use the Azure DevOps Variable Library to store and access the ChangeId. Change Creation Task sets the ChangeId as an output variable, which can be stored in the Variable Library and referenced in Gating Tasks. Steps to Update and Use the Variable Library for Gating Tasks:
Configure the Gating Task to Use the Library VariableIn your Azure DevOps environment, configure the gating task to reference the UI Example:
Support and TroubleshootingFor support, visit our support page or contact us at support@freshservice.com. Common Issues:
FAQsQ: Can I use this extension in YAML pipelines? Q: Is there a way to revert a pipeline run if a change fails? Q: How do I find the ChangeId in Freshservice? Q: How do I use the ChangeId from a YAML pipeline in a Gating Task? A: You can use the Azure DevOps Variable Library to store and access the ChangeId from a YAML pipeline in Gating Tasks as mentioned above. Additional Resources |