2
votes

We keep our release definitions in an external repo and import them into Azure DevOps quite frequently. Two things that we have noticed when doing this is that we have to do manually:

  1. Specify the Agent pool to use even though the agent pool from that was specified when the definition was exported still exists.
  2. Re-link variable groups even though the groups specified in the definition still exist and are unmodified.

Is there some way for these things to automatically be hooked up on import? When I clone the original pipeline I don't have to specify these values so I would hope there was some sort of similar mechanism for import.

2
This requirement is probably by the YAML for release pipelines releasing in preview sometime around March.Matt

2 Answers

0
votes

No any way to achieve that, it's by design.

Generally if in current team project you can Clone the release definition directly, that will include the Agent pool and Variable Group with it.

Export/Import is used for different projects or different collections or even cross accounts. In general different team projects or collections or accounts have different agent pools and variable groups, we need to specify that separately.

0
votes

I needed to import > 200 release pipelines during our TFS upgrade. It would be a pain to have to manually set the deployment groups, so while not ideal, I did find a way to work around it.

  1. Export the release definition
  2. Delete the release definition
  3. Import the release definition
  4. Update the deployment groups and/or link the variable groups
  5. Show the debugging console and watch the network traffic
  6. Save the release definition
  7. The release definition just makes a call to the release api, so you can grab the request json and save that to a file

After you have the json in a file, instead of using the front-end for adding the release definition, instead make a call to release definition API and pass the contents of your saved json.