title: Deploy many apps through ONE release process via Azure DevOps
body: <p>I need to deploy <strong>many</strong> similar apps to the same environments with Azure DevOps.</p>
  
  <p>What are some ways to share and maintain the release process for these apps....<br />
  to avoid updating every app's Release process when it changes?</p>
  
  <p><strong>Background</strong></p>
  
  <ol>
  <li>I have dozens of similar apps with <strong>identical</strong> release processes.</li>
  <li>Each app (in its own repo) will have its own Azure Pipeline.</li>
  <li>I'm fine with a custom solution to this problem.</li>
  </ol>
  
  <p><strong>Options</strong></p>
  
  <ol>
  <li><strong>Make a Release for every Pipeline</strong> -- <em>not a fan!</em>
  
  <ul>
  <li>CON: Azure seems to want a 1-to-1 relationship between Pipelines and Releases.</li>
  <li>CON: I want to avoid many Releases at all costs, since changes would be nearly unmaintainable.</li>
  </ul></li>
  <li><p><strong>Use custom stage templates</strong> -- <em>doesn't work for what I need</em></p>
  
  <ul>
  <li><p>CON: Releases <strong>do not share</strong> custom stage templates.</p>
  
  <blockquote>
    <p>Custom templates that you create are scoped to the project that you created them in. [<a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/release/env-templates?view=azure-devops#can-i-export-templates-or-share-them-with-other-subscriptions-enterprises-or-projects" rel="nofollow noreferrer">Azure Documentation</a>]</p>
  </blockquote></li>
  <li><p>CON: Custom stage templates <strong>cannot be updated</strong> (as of this post).</p>
  
  <blockquote>
    <p>To update an stage template, delete the existing template in a release pipeline and then save the stage as a template with the same name. [<a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/release/env-templates?view=azure-devops#how-do-i-update-a-custom-stage-template" rel="nofollow noreferrer">Azure Documentation</a>]</p>
  </blockquote></li>
  </ul></li>
  <li><p><strong>Put the release process in the Pipeline .yml file</strong> -- <em>seems possible, but....</em></p>
  
  <ul>
  <li>PRO: The process would be stored in a shared "common" repo.</li>
  <li>PRO: Each app will have a minimal Pipeline .yml file, setting some parameters before running the shared process.</li>
  <li>CON: How would I <strong>track and manually deploy releases without the Release portal UI?</strong> Am I missing something?</li>
  </ul></li>
  <li><strong>Trigger the same Release with artifacts from different apps</strong> -- <em>not sure this will work....</em>
  
  <ul>
  <li>PRO: One release process, easy to track and deploy as needed via the Release portal UI.</li>
  <li>CON: How would I <strong>track releases for different apps</strong>? Would I name Releases with the app name?</li>
  <li>CON: I don't see how to set it up, since a Release is tied to a primary Pipeline.
  
  <blockquote>
    <p>At the time of linking an artifact source to a release pipeline.... [<a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/release/artifacts?view=azure-devops#sources" rel="nofollow noreferrer">Azure Documentation</a>]</p>
  </blockquote></li>
  <li>CON: Though multiple artifact sources can be used, Releases need a default artifact Pipeline or source repo. Would I need to setup the artifact source programmatically?
  
  <blockquote>
    <p>When you link multiple artifact sources to a release pipeline, one of them is designated as the primary artifact source. The primary artifact source is used to set a number of pre-defined variables. It can also be used in naming releases. [<a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/release/artifacts?view=azure-devops#primary-source" rel="nofollow noreferrer">Azure Documentation</a>]</p>
  </blockquote></li>
  </ul></li>
  <li><strong>Use multiple artifact sources and artifact variables</strong> -- <em>not sure this will work....</em>
  
  <blockquote>
    <p>When there are multiple artifact sources linked to a release pipeline, you can access information about each of these. [<a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/release/artifacts?view=azure-devops#artifact-variables" rel="nofollow noreferrer">Azure Documentation</a>]</p>
  </blockquote></li>
  </ol>
  
  <p><strong>Bottom Line</strong></p>
  
  <p>I was able to solve many of these problems in Octopus Deploy. However, I'm having significant trouble seeing how to move my DevOps process into Azure DevOps. How would you handle this situation?</p>