-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines.yaml
78 lines (66 loc) · 2.17 KB
/
azure-pipelines.yaml
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# 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
# leaving off branch name for now as the build appears on the page and is
# visible to the user $(SourceBranchName)
name: $(Date:yyyyMMdd)$(Rev:.r)
trigger:
- master
variables:
buildConfiguration: 'Release'
steps:
# Not needed for local build agent
# - task: UseDotNet@2
# inputs:
# version: '3.0.100-preview4-011223'
- task: DotNetCoreCLI@2
displayName: 'dotnet restore (custom)'
inputs:
command: custom
# Required to get custom nuget.config to work
custom: restore
arguments: '--configfile ./NuGet.config --verbosity minimal'
- task: DotNetCoreCLI@2
displayName: 'dotnet build'
inputs:
arguments: '--configuration $(buildConfiguration) --no-restore'
configuration: $(buildConfiguration)
- task: DotNetCoreCLI@2
displayName: 'dotnet publish - WCA.Web'
inputs:
command: publish
arguments: '--configuration $(buildConfiguration) --output $(build.artifactstagingdirectory) --no-restore --no-build'
projects: ./src/WCA.Web/WCA.Web.csproj
zipAfterPublish: true
modifyOutputPath: true
- task: DotNetCoreCLI@2
displayName: 'dotnet test'
inputs:
command: test
arguments: '--configuration $(buildConfiguration) --no-restore --no-build'
configuration: $(buildConfiguration)
nobuild: true
publishTestResults: true
- task: Npm@1
displayName: 'npm run unit-test'
inputs:
command: 'custom'
workingDir: './src/WCA.Web'
customCommand: 'run unit-test'
# - task: Npm@1
# displayName: 'npm run test'
# inputs:
# command: 'custom'
# workingDir: './src/WCA.Web/client-app'
# customCommand: 'run test'
- task: ArchiveFiles@2
displayName: 'zip WCA.AzureFunctions'
inputs:
rootFolderOrFile: './src/WCA.AzureFunctions/bin/Release/netcoreapp3.1/'
includeRootFolder: false
archiveFile: '$(Build.ArtifactStagingDirectory)/WCA.AzureFunctions.zip'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)'