4
votes

We are trying to automate the release process of a .NET Core application taking advantage of Azure DevOps pipelines. The idea is to deploy in three different environments with their isolated databases. Currently we have a single artifact generated by a build, and is deployed by a Release in the environments without any kind of transformation, so, in this point, which one could be the best approach:

  1. Generate multiple artifacts with the transformation alread done in the build, and then perform the deployment of the different artifacts with it's right environment by the release.
  2. Generate a single artifact, and perform the different transformations at any environment within it's own stage relase phase.
  3. Another idea?

Thank you in advance

1

1 Answers

4
votes

I would suggest going with option 2, option 1 I have my concerns with... is it even a very good auditing practice since means you are creating x amount of artifacts? Whereas the idea of creating 1 artifact and changing environment based configurations assures that the code really is the same throughout all environments.

if you need, here is the docs url with some very well explained info on how to do the transformation with .json files https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/transforms-variable-substitution?view=azure-devops