0
votes

I have around 80 DLL's for which builds are created and pushed to Nuget using Azure Devops. I am trying to create release pipeline by seggrigating different builds into different release pipelines.

But before creating I would like to identify if other release pipeline exist which using these builds as artifacts? How could I identify if a release pipelines exits which already uses above builds.

1
As Matt said, you can use https://vsrm.dev.azure.com/ProjectSamples/WebAppDeploy/_apis/release/definitions?$expand=Artifacts&api-version=5.1 to list the details of all the release pipeline in one project. And the response will display which build is consumed by one release pipeline as artifact.LoLance

1 Answers

2
votes

You will want to use the API for Release Pipelines and pass the artifacts expand option. I'll leave you to figure out the authentication piece (there are other answers that cover it).

Here's an example in PowerShell:

$uri = 'https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/definitions?api-version=5.1&$expand=artifacts'

Invoke-RestMethod -Method get -uri $uri -UseDefaultCredentials | Select-Object -ExpandProperty value | Select-Object id, artifacts