Microsoft Certified: DevOps Engineer ExpertDesign and implement source controlMedium
A software development company uses Azure DevOps for its source control. They have a large monorepo with several independent projects, each managed by a different team. They want to integrate a third-party code quality analysis tool that runs a scan whenever code is pushed to the `main` branch. This tool has a webhook that can be configured to receive notifications from Azure DevOps. The company needs to configure Azure DevOps to send specific events to this webhook. Which Azure DevOps feature should they use?
- AService connections
- BBuild pipeline triggers
- CWebhooks in repository settings
- DService hooks
Show answer & explanationAnswer & explanation
Correct answer: D. Service hooks
Service hooks in Azure DevOps allow you to integrate with external services by sending notifications when specific events occur. You can configure a service hook to trigger on code pushes, pull request updates, or build completions, and then send a payload to a specified webhook URL, which is exactly what the third-party tool requires.
Why the other options are wrong
- A. Service connections are used for connecting Azure DevOps to external services for tasks like deployment or authentication, not for sending event notifications via webhooks.
- B. Build pipeline triggers initiate Azure DevOps pipelines, they do not send notifications to external third-party webhooks.
- C. While some repository systems have direct webhook settings, in Azure DevOps, the generic mechanism for sending events to external webhooks is 'Service hooks'.
Azure DevOps Service Hooks
A mechanism in Azure DevOps to integrate with external services by sending notifications or payloads when specific events occur within Azure DevOps (e.g., code push, build completion, work item update).
- Configured at the project level.
- Supports various event types (code, build, work item, release).
- Can send data to webhooks, Azure Functions, or other integrated services.
- Enables automation and integration with third-party tools.
Memory trick: Service hooks connect events to external services, like a switchboard.