This Azure Pipeline blog post will show you how to create and publish a .NET app into an artifact and deploy it to an Azure Web App, App Service.
Azure Pipelines allow us to build, test and deploy .NET applications to a Web App in a single pipeline which is very handy for small deployments.
In our case, we are using the AzureRmWebAppDeployment and the DotNetCoreCLI tasks to create an artifact from a .NET build and publish it directly to an existing Azure Web App.
Azure Pipeline
To use the tasks below, Add your Azure tenant details and run the job.
- task: [email protected]
displayName: 'Publish Artifact $(buildConfiguration)'
inputs:
command: publish
publishWebProjects: True
arguments: '--configuration $(BuildConfiguration) --output $(Build.ArtifactStagingDirectory)'
zipAfterPublish: True
- task: [email protected]
inputs:
ConnectionType: 'AzureRM'
azureSubscription: 'SUN-NAME'
appType: 'webApp'
WebAppName: 'APPNAME'
deployToSlotOrASE: true
ResourceGroupName: 'RGNAME'
SlotName: 'production'
packageForLinux: '$(Build.ArtifactStagingDirectory)/**/*.zip'
Processing…
Success! You're on the list.
Whoops! There was an error and we couldn't process your subscription. Please reload the page and try again.
Leave a Reply