I recently stumbled on a problem that required the ability to trigger a release outside the project and even outside our on-premises Azure DevOps. To tackle this, I created a custom build/release task that enables creating a release in another Azure DevOps On-Prem project, project collection, farm or in Azure DevOps.
The solution is based on the REST API that comes with Azure DevOps On-Prem or is available in Azure DevOps. This API is described here. We will use two methods:
- get release definitions
- create a release
We use a personal access token to authenticate the calls to the API. I explain how to create a personal access token in my blog post: Custom Azure DevOps pipeline task to execute a SQL script.
Encode the personal access token: