-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathazure-pipelines.yml
43 lines (34 loc) · 1.38 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
# 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
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
variables:
buildConfiguration: 'Release'
major: 2
minor: 0
patch: $[counter('patch', 0)]
name: $(date:MMdd)-$(BuildDefinitionName)-$(major).$(minor).$(patch)
steps:
- task: SonarSource.sonarcloud.14d9cde6-c1da-4d55-aa01-2965cd301255.SonarCloudPrepare@1
displayName: 'Prepare analysis on SonarCloud'
inputs:
SonarCloud: SonarCloud
organization: 'vfabing-github'
projectKey: chronos.net
projectName: 'Chronos.Net '
- script: |
dotnet restore Chronos.Net.sln
dotnet build Chronos.Net.sln --configuration $(buildConfiguration) /p:VersionPrefix=$(major).$(minor).$(patch)
dotnet test Chronos.Net.sln --no-build --configuration $(buildConfiguration) --logger:trx
dotnet pack Chronos.Net.sln --no-build --configuration $(buildConfiguration) /p:PackageVersion=$(major).$(minor).$(patch) -o $(build.artifactstagingdirectory)
- task: PublishTestResults@2
inputs:
testResultsFormat: 'VSTest'
testResultsFiles: '**/TestResults/*.trx'
- task: SonarSource.sonarcloud.ce096e50-6155-4de8-8800-4221aaeed4a1.SonarCloudAnalyze@1
displayName: 'Run Code Analysis'
- task: PublishBuildArtifacts@1