This repository has been archived by the owner on Jan 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
96 lines (77 loc) · 2.56 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
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
trigger:
- master
pool:
vmImage: windows-latest
variables:
BuildConfiguration: Release
stages:
- stage: Build
jobs:
- job: BuildAndTest
steps:
- checkout: self
displayName: Checkout
- task: DotNetCoreCLI@2
displayName: Remove availability project
inputs:
command: custom
custom: sln
arguments: remove PrimeMultiplication.Availability
- task: DotNetCoreCLI@2
displayName: Restore
inputs:
command: restore
- task: DotNetCoreCLI@2
displayName: Install Coverlet
inputs:
command: custom
custom: add
projects: PrimeMultiplication.Tests
arguments: package coverlet.msbuild
- task: DotNetCoreCLI@2
displayName: Build
inputs:
command: build
arguments: --configuration $(BuildConfiguration) --no-restore
- task: DotNetCoreCLI@2
displayName: Test
inputs:
command: test
arguments: --configuration $(BuildConfiguration) --no-build /p:CollectCoverage=true /p:CoverletOutput=TestResults/ /p:CoverletOutputFormat=cobertura
- task: PublishCodeCoverageResults@1
displayName: Publish code coverage
inputs:
codeCoverageTool: cobertura
summaryFileLocation: $(System.DefaultWorkingDirectory)/**/coverage.cobertura.xml
- task: Bash@3
displayName: Upload to Codecov
inputs:
targetType: inline
script: bash <(curl -s https://codecov.io/bash)
- task: DotNetCoreCLI@2
displayName: Publish web project
inputs:
command: publish
publishWebProjects: false
projects: PrimeMultiplication.Web
arguments: --configuration $(BuildConfiguration) --output $(build.ArtifactStagingDirectory)/web
zipAfterPublish: True
- publish: $(Build.ArtifactStagingDirectory)/web
displayName: Publish build artifact
artifact: web
- stage: Release
dependsOn: Build
jobs:
- job: Deploy
steps:
- checkout: none
- download: current
artifact: web
- task: AzureRmWebAppDeployment@4
displayName: Deploy to Azure app service
inputs:
ConnectionType: AzureRM
azureSubscription: Azure PrimeMultiplication
appType: webApp
WebAppName: prime-multiplication
packageForLinux: $(Pipeline.Workspace)/web/*.zip