From Azure DevOps events
Suppose users want to trigger a pipeline or release when a code is pushed to a branch on Azure Devops, when a Pull request is raised, or when a Pull Request is merged, or if a Pull request is updated, on Azure Devops, then users can create a webhook on ozone where the webhook type can be selected as Azure Devops.
Steps to create an Azure DevOps Webhook for release
Pre-requisites:
An active Azure DevOps account with repositories needs to have the PAT which can be entered while creating Azure DevOps integrations
An Active cluster
A Release that has been created from the Release Templates section
Steps
On click of the create webhook button, a modal window appears in which we can enter the details for webhook creation
Now we need to select the Webhook Type as Azure DevOps from the Webhook Type dropdown
After this users are provided an option to select the integration for which they want to create the webhook i.e. based on this selection the repos and projects will be shown. Users can select the desired integration based on their preferences.
Once the integrations are selected, the projects that are created in the selected integrations will be shown in the dropdown
After selecting the project, users will be shown a dropdown to select the repos for which the webhook needs to be created
After this users need to select the event for which the pipeline or the release needs to be triggered, Ozone provides 4 Azure DevOps events for which the pipeline or release can be triggered - Push Branch - When the code is pushed to the respective branch - Pull Request Raised - When the Pull Request is raised for the selected branch - Pull Request Merged - When the Pull Request is successfully merged - Pull Request Updated - When the Pull Request is updated
Once the Event has been selected, users will be shown a dropdown to select the branch for which they want the webhook to be created.
After selecting the branch, select the trigger type as the release
After this users can select the release which they want to be triggered
Once every option have been selected the map parameters option will be enabled and users can click on it to move to the next step
After going to the second step users can choose the input run parameters, once all these options have been selected, users can click on the save button to create the webhook
Steps to create Azure DevOps webhook for pipeline
Pre-requisites:
An Active cluster
A microservice
Follow the same steps until Step 7 of Creating Webhooks for release Steps:
Select the trigger type as Pipeline
Once the Trigger type has been selected, now select the pipeline that needs to be triggered
After selecting the pipeline, select the environment in which the webhook needs to be created Remember to select the environment the same in which the cluster has been created
After selecting the environment, users will be shown an option to select the cluster
Once the cluster has been selected, select the microservice
After selecting the microservice, users can move to the Map parameters step, to select the run parameters for the pipeline
In Map parameters, users can select all the options as they desire
Once all this is done, users can click on the Save button to create the webhook for the pipeline.
This is how Webhooks are created for Azure Devops to trigger a release or a pipeline.
Last updated