-
-
Notifications
You must be signed in to change notification settings - Fork 134
/
azure-pipelines.yml.txt
55 lines (45 loc) · 1.56 KB
/
azure-pipelines.yml.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# ASP.NET Core
# Build and test ASP.NET Core projects targeting .NET Core.
# Add steps that run tests, create a NuGet package, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
trigger:
- master
pool:
vmImage: 'windows-latest'
variables:
BuildConfiguration: 'Release'
SolutionPath: 'YOUR_SOLUTION_FOLDER/YOUR_SOLUTION.sln'
steps:
# Optional: 'dotnet restore' is not necessary because the 'dotnet build' command executes restore as well.
#- task: DotNetCoreCLI@2
# displayName: 'Restore dependencies'
# inputs:
# command: restore
# projects: '**/*.csproj'
- task: DotNetCoreCLI@2
displayName: 'Build web project'
inputs:
command: 'build'
projects: $(SolutionPath)
- task: DotNetCoreCLI@2
displayName: 'Publish and zip'
inputs:
command: publish
publishWebProjects: False
projects: $(SolutionPath)
arguments: '--configuration $(BuildConfiguration) --output $(Build.ArtifactStagingDirectory)'
zipAfterPublish: True
- task: AzureWebApp@1
displayName: 'Deploy Azure Web App'
inputs:
azureSubscription: '<REPLACE_WITH_AZURE_SUBSCRIPTION_INFO>'
appName: <REPLACE_WITH_EXISTING_APP_SERVICE_NAME>
appType: 'webApp'
package: $(Build.ArtifactStagingDirectory)/**/*.zip
# Optional step if you want to deploy to some other system using a Release pipeline or inspect the package afterwards
- task: PublishBuildArtifacts@1
displayName: 'Publish Build artifacts'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'