-
-
Notifications
You must be signed in to change notification settings - Fork 74
/
azure-pipelines.yml
68 lines (66 loc) · 2.11 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
trigger:
- master
variables:
buildConfiguration: 'Release'
stages:
- stage: Build_and_test_stage
jobs:
- job: Build_and_test_job
pool:
vmImage: 'ubuntu-latest'
steps:
- task: UseDotNet@2
displayName: "Use .NET 6.0 SDK"
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_NOLOGO: true
inputs:
packageType: 'sdk'
version: '6.0.x'
- task: DotNetCoreCLI@2
displayName: "Build Huxley 2"
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_NOLOGO: true
inputs:
command: 'build'
projects: '**/*.csproj'
arguments: '--configuration $(buildConfiguration)'
- task: DotNetCoreCLI@2
displayName: "Unit test Huxley 2"
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_NOLOGO: true
inputs:
command: 'test'
projects: '**/*Tests/*.csproj'
arguments: '--configuration $(buildConfiguration) --collect:"XPlat Code Coverage"'
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: 'cobertura'
summaryFileLocation: '$(Agent.TempDirectory)/*/coverage.cobertura.xml'
- task: DotNetCoreCLI@2
displayName: "Publish Huxley 2 package"
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_NOLOGO: true
inputs:
command: 'publish'
publishWebProjects: true
projects: '**/Huxley2.csproj'
arguments: '--configuration $(buildConfiguration) --output $(Build.ArtifactStagingDirectory)'
- task: PublishBuildArtifacts@1
displayName: 'Publish Huxley 2 artefact'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'
- task: AzureRmWebAppDeployment@4
displayName: 'Deploy Huxley 2 to Azure web app service'
inputs:
ConnectionType: 'AzureRM'
azureSubscription: 'Azure subscription 1(e78f5ea0-bc84-42ba-8122-2a20415a6d00)'
appType: 'webAppLinux'
WebAppName: 'huxley2'
packageForLinux: '$(Build.ArtifactStagingDirectory)/**/Huxley2.zip'
RuntimeStack: 'DOTNETCORE|6.0'