-
Notifications
You must be signed in to change notification settings - Fork 0
/
01_azure-pipelines-ci.yml
48 lines (39 loc) · 1.12 KB
/
01_azure-pipelines-ci.yml
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
trigger: 'none' # will disable CI builds entirely
pool:
vmImage: 'windows-2019'
variables:
BuildConfiguration: release
steps:
- task: UseDotNet@2
displayName: Install .NET 6 sdk
inputs:
packageType: sdk
version: 6.0.x
installationPath: $(Agent.ToolsDirectory)/dotnet
- task: DotNetCoreCLI@2
displayName: Restore Nuget Packages
inputs:
command: restore
projects: '**/WebApp.csproj'
- task: DotNetCoreCLI@2
displayName: Build Web App
inputs:
projects: '**/WebApp.csproj'
arguments: '--configuration $(BuildConfiguration)'
- task: DotNetCoreCLI@2
displayName: Run Unit Tests
inputs:
command: test
projects: '**/*UnitTest*.csproj'
arguments: '--configuration $(BuildConfiguration)'
- task: DotNetCoreCLI@2
displayName: Create Web App Package (.zip)
inputs:
command: publish
publishWebProjects: True
arguments: '--configuration $(BuildConfiguration) --output $(build.artifactstagingdirectory)'
zipAfterPublish: True
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact (WebApp.zip)'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)'