-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathazure-pipelines-rc.yml
49 lines (47 loc) · 1.76 KB
/
azure-pipelines-rc.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
trigger:
tags:
include:
- v*
pool:
vmImage: 'windows-latest'
variables:
buildConfiguration: 'Release'
steps:
- task: UseDotNet@2
displayName: 'Use .NET Core sdk >=3.x'
inputs:
packageType: sdk
# workaround for 'UseDotNet@2 cant find sdk version matching 3.x #11569'
# https://github.com/microsoft/azure-pipelines-tasks/issues/11569
version: 3.0.x
# version: 3.x
- task: SonarSource.sonarcloud.14d9cde6-c1da-4d55-aa01-2965cd301255.SonarCloudPrepare@1
displayName: 'Prepare analysis on SonarCloud'
inputs:
SonarCloud: 'corgit sonarcloud'
organization: 'jzebedee-github'
projectKey: 'jzebedee_corgit'
projectName: corgit
- script: |
dotnet build src/corgit --configuration $(buildConfiguration) --output $(Build.BinariesDirectory)
displayName: 'dotnet build $(buildConfiguration)'
- task: DotNetCoreCLI@2
inputs:
command: test
projects: '**/*tests/*.csproj'
arguments: '--configuration $(buildConfiguration) --collect "Code coverage"'
- script: |
dotnet pack src/corgit --configuration $(buildConfiguration) --no-build --output $(Build.ArtifactStagingDirectory)/package-rc
dotnet publish src/corgit --configuration $(buildConfiguration) --no-build --output $(Build.ArtifactStagingDirectory)/pub
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)/package-rc
ArtifactName: 'package'
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)/pub
ArtifactName: 'pub'
- task: SonarSource.sonarcloud.ce096e50-6155-4de8-8800-4221aaeed4a1.SonarCloudAnalyze@1
displayName: 'Run Code Analysis'
- task: SonarSource.sonarcloud.38b27399-a642-40af-bb7d-9971f69712e8.SonarCloudPublish@1
displayName: 'Publish Quality Gate Result'