Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Multi-stage YAML pipeline
# ASP.NET
# Build and test ASP.NET projects.
# Add steps that publish symbols, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/apps/aspnet/build-aspnet-4
trigger:
- main
pool:
vmImage: 'ubuntu-latest'
stages:
- stage: build
jobs:
- job: build
steps:
- script: dotnet build
displayName: 'dotnet build'
- script: dotnet publish -o $(build.artifactStagingDirectory)
displayName: 'publish artifacts'
- task: PublishPipelineArtifact@1
inputs:
targetPath: $(build.artifactStagingDirectory)
artifact: 'drop'
publishLocation: 'pipeline'
- stage: deploy_app
jobs:
- job: deploy
steps:
- task: DownloadPipelineArtifact@2
inputs:
buildType: 'current'
artifactName: 'drop'
targetPath: '$(Pipeline.Workspace)/drop'
- task: AzureWebApp@1
inputs:
azureSubscription: 'Visual Studio Enterprise Subscription(97fbe79d-f21c-4cd0-b87f-8bd8df413e0a)'
appType: 'webAppLinux'
appName: 'TodoistApp'
package: '$(Pipeline.Workspace)/drop'
runtimeStack: 'DOTNETCORE|6.0'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment