You can trigger Microsoft Azure DevOps pipelines Cloud and Server from Bitbucket Server or Data Center.
In order to trigger an Azure DevOps pipeline, you need to set up the link to the pipeline and configure personal access token (PAT).
Below the URL field, you can see the URL pattern.
You can copy the URL from the browser when you navigate the Azure DevOps Pipeline definition.
When you create a PAT please make sure the token has the minimal scope - Build → Read & execute.
Additionally, do make sure that outgoing traffic is allowed from your Bitbucket Server to the Azure DevOps infrastructure.
Azure DevOps pipeline parameters
In case you want to update the build status in Bitbucket from the Azure DevOps pipeline you may need to use some parameters.
The following parameters are passed to the pipeline when it is triggered.
projectKey- the Bitbucket project key.
projectName- the Bitbucket project’s name.
repositorySlug- the Bitbucket repository slug.
repositoryName- the Bitbucket repository's name.
commit- the git commit hash.
commitMessage- optional commit message.
branch- the git branch name.
sourceBranch- the git source branch for pull request events.
destinationBranch- the git destination branch for pull request events.
userDisplayName- the user's (actor) display name.
userSlug- the user's slug.
eventType- the event type.
pullRequestId- the id of the pull request (only pull request related events).
pullRequestTitle- the title of the pull request (only pull request related events).
pullRequestDescription- the description of the pull request (only pull request related events).
pullRequestState- the state of the pull request (only pull request related events).
For some Bitbucket events, some parameters are not available, as a result, they are not sent to the Azure DevOps pipeline.