I am trying to pass artifact from build pipeline to release pipeline using REST API call. But I couldn't find an option to pass the artifact source or artifact name . The json body i am using is given below
{
"definitionId": 1,
"description": "test release",
"artifacts": [
{
"alias": "Customer.CI",
"instanceReference": {
"id": "2",
"name": null
}
}
],
"isDraft": false,
"reason": "none",
"manualEnvironments": null
}
ALso the rest api call is as below
$Uri=https://vsrm.dev.azure.com/Orgname/ProjName/_apis/release/releases?api-version=5.1
Invoke-RestMethod -Method Post -UseDefaultCredentials -ContentType application/json -Uri $Uri -Body $bodyString -Headers $header
How to pass different artifact at run time during the POST API call of the release pipeline