4

As a reasonably sized dev team, our pull requests are all deploying to the same dev environment in Azure. I could add a terraform or Azure CLI script and a build step to try to create the infrastructure, then deploy out the app but that seems a bit clunky and handmade for what seems like an obvious need. I think the process changes a bit if we can switch to .NET Core and use the added pipeline capability there.

How can I have a pull request in Azure DevOps create a temporary environment that lives for the life of the pull request or until the build expires? I'm looking for something similar to Heroku's Review App. I would like to know how to do this both for .NET Core, using the pipelines, as well as original recipe .NET.

Thank you!

2
  • Did you manage to find a decent solution?
    – GFoley83
    Mar 11, 2019 at 23:21
  • I have not been able to implement a decent solution, yet. I did stumble across a blog that documents a possible solution. I will give it a try when I have time. samlearnsazure.blog/2020/02/27/… Jan 31, 2022 at 19:38

3 Answers 3

4

With some scripting in your CI/CD pipeline.

For building, consider Microsoft hosted build agents. Already one use VMs.

For a dynamically created test environment, you will probably have to put together a few pieces. Like pull request triggers in a release pipeline that has an Azure ARM template that deploys the Pipelines agent. Cleaning up might need to get a bit creative, but presumably you can have a stage trigger delete the environment.

3

Consider Azure Dev Spaces. Developers can spin up ephemeral environments from visual studio with randomised public URL as easy as running on localhost. Maybe this could fulfill your needs or if not, you might be able to automate spinning up Dev Spaces from the build pipeline used by your check-in gate

0

there is no way of doing this, you might be able to get away with Azure web app deployment slots (if you use webapps). but generally speaking you need to have your infrastructure defined as code.

1
  • I feel this is definitely doable via custom solution but I was just wondering if there was an 'out of the box' way of doing it. I will create a POC and return here to share it. Dec 17, 2018 at 22:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .