The Doc says
"An environment is a collection of resources that can be targeted by deployments from a pipeline. Environments can include Kubernetes clusters, Azure web apps, virtual machines, databases. Typical examples of environment names are Dev, Test, QA, Staging, and Production."
But I don't see anyway to add an Azure Web App. When I create an environment I get two options when adding resources, kubernetes or virutal machines. I don't see anything about adding Azure Web Apps.
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Totaly agree with andrewwiebe.
There's document on how to deploy on "Web App on Linux/Linux Container/Windows" (https://docs.microsoft.com/en-us/azure/devops/pipelines/targets/webapp-linux?view=azure-devops), but implies no use of environment.
agree. web app support in azure devops environment must be key feature. it is really disappointing that it is not implemented yet.
@WilliamAntonRohm Any updates on this?
I resolved this using Yaml pipeline configuration.
I created a two stage pipeline, the first one for the build, and the second one for deploy.
In this second stage, I specify the value i want for the property "environment".
Here's a the beginning of this stage (indentation not respected) :
_- stage: Deploy
- jobs:
# track deployments on the environment
- deployment: DeployWeb
pool:
vmImage: 'ubuntu-latest'
# creates an environment if it doesn't exist
environment: 'nameOfMyEnvironment'
[......]_
@david-77 that is a fine workaround, but it requires that you include information that you might not want to source control. I assume that is one of the main benefits of creating environments separately then using them in a pipeline - you do not actually have to expose your Azure resource information (access keys, names) etc. in the pipeline yaml file.
Looking forward to this feature being extended to Azure resources.
It's really incredible this is not supported or even very clear at this point. We just moved to DevOps and were excited with yaml release pipelines, but I'll guess we'll stick with classic ones for a while.
We recently updated the Environment article to make this clearer. It would be helpful if you could post your feature request to have Azure web app environments in the Developer Community. That space is monitored closely by the product team. There was a recent question around this issue.
@david-77 that is a fine workaround, but it requires that you include information that you might not want to source control. I assume that is one of the main benefits of creating environments separately then using them in a pipeline - you do not actually have to expose your Azure resource information (access keys, names) etc. in the pipeline yaml file.
Looking forward to this feature being extended to Azure resources.
Actually you can just have all the build / deploy code in yaml pipelines referencing variables. Then you create a group of variables for each environment. That way your keys are not stored in Git, but are kept secret inside the Azure DevOps pipeline library.
Most helpful comment
Totaly agree with andrewwiebe.
There's document on how to deploy on "Web App on Linux/Linux Container/Windows" (https://docs.microsoft.com/en-us/azure/devops/pipelines/targets/webapp-linux?view=azure-devops), but implies no use of environment.