-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathazure-pipelines.yml
47 lines (39 loc) · 1.36 KB
/
azure-pipelines.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
pool:
vmImage: 'vs2017-win2016'
steps:
- script: npm install
workingDirectory: $(frontEndRootDirectory)
displayName: 'Restore npm packages'
- script: dotnet restore $(mainProjectFile)
displayName: 'Restore NuGet packages'
- script: dotnet build -c $(configuration) $(mainProjectFile)
displayName: 'Build the project'
- task: DotNetCoreCLI@2
inputs:
command: test
projects: '**/*Test/*.csproj'
arguments: '--configuration $(configuration)'
displayName: 'Run back-end unit tests'
- script: npm test
workingDirectory: $(frontEndRootDirectory)
displayName: 'Run front-end unit tests'
- script: dotnet publish -c $(configuration) -o $(System.DefaultWorkingDirectory)/publish $(mainProjectFile)
displayName: 'Create project release files'
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: $(System.DefaultWorkingDirectory)/publish
includeRootFolder: false
archiveType: 'zip'
archiveFile: $(System.ArtifactsDirectory)/publish.zip
replaceExistingArchive: true
displayName: 'Create release artifact'
- task: AzureRmWebAppDeployment@3
inputs:
azureSubscription: $(azureSubscription)
WebAppName: $(webAppName)
Package: $(System.ArtifactsDirectory)/**/*.zip
RenameFilesFlag: true
TakeAppOfflineFlag: true
RemoveAdditionalFilesFlag: true
ExcludeFilesFromAppDataFlag: true
displayName: 'Deploy the application'