I have configured different Pipelines for different applications through Azure DevOps. Is there any REST service available to trigger builds and then deploy the artifacts on different Stages?
Asked
Active
Viewed 149 times
0
-
Just confirm this ticket progress after the weekend. Does below method is work for you? Free to comment here if it not what you want. – Mengdi Liang Jan 20 '20 at 07:12
2 Answers
1
There is no straight forward way to achieve this, Here is something what you can do:
- You can utilize Release-Create api to trigger a particular release using below api:
POST https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/releases?api-version=5.1
- Usually each stage pipeline will be executed after former one is succeded, so you can have a custom Powershell task created which you can execute it once the deployment to former slot is succesfull.
This custom task will be executed at the end of the pipeline. Same api can help you invoke the release pipeline:
Invoke-RestMethod -Uri $releaseUrl -Headers @{ Authorization = "Bearer $env:SYSTEM_ACCESSTOKEN" } -Method post -Body $body -ContentType "application/json"
Additional reference:
Overall flow would be:
Create release using API ---> Dev pipeline triggered- Powershell Task execution--> Trigger QA release pipeline using API- ---> etc
Hope it helps.

Mohit Verma
- 5,140
- 2
- 12
- 27
0
Yes, Azure provides REST Api end points for each and every resource available in API-Management, which will be very helpful when we want to move the resources from one instance to other. These end points can also be used in automation to test the resources used in the APIM

Aslesha Ch
- 26
- 2