forked from kubernetes-client/csharp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.azure-pipelines.yaml
95 lines (73 loc) · 2.5 KB
/
.azure-pipelines.yaml
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
jobs:
- job: build_xamarin
pool:
vmImage: 'VS2017-Win2016'
steps:
- task: MSBuild@1
displayName: 'NuGet restore'
inputs:
solution: '$(Build.SourcesDirectory)/src/KubernetesClient/KubernetesClient.csproj'
msbuildArguments: '/restore /p:Configuration=Release'
- task: MSBuild@1
displayName: 'MSBuild Pack'
inputs:
solution: '$(Build.SourcesDirectory)/src/KubernetesClient/KubernetesClient.csproj'
msbuildArguments: '/t:pack /p:Configuration=Release /p:PackageOutputPath="$(Build.ArtifactStagingDirectory)/nupkg/"'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)/nupkg/'
- job: Build
pool:
vmImage: 'VS2017-Win2016'
steps:
- task: DotNetCoreCLI@2
displayName: 'dotnet restore'
inputs:
command: restore
- task: DotNetCoreCLI@2
displayName: 'dotnet build'
inputs:
projects: '**/*.sln'
# - task: MSBuild@1
# displayName: 'Build solution **/*.sln'
# inputs:
# msbuildArchitecture: x64
# configuration: Release
# - task: VSTest@2
# displayName: 'VsTest - testAssemblies'
# inputs:
# testAssemblyVer2: |
# tests\**\*Tests*.dll
# !**\obj\**
# codeCoverageEnabled: true
- task: DotNetCoreCLI@2
displayName: 'dotnet test'
inputs:
command: test
projects: tests\**\*.csproj
arguments: /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura
- task: PublishCodeCoverageResults@1
displayName: 'publish coverage results'
inputs:
codeCoverageTool: 'cobertura'
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.cobertura.xml'
- task: alanwales.resharper-code-analysis.custom-build-task.ResharperCli@1
displayName: 'Automated code quality checks'
inputs:
SolutionOrProjectPath: 'kubernetes-client.sln'
FailBuildOnCodeIssues: false
continueOnError: true
- task: DotNetCoreCLI@2
displayName: 'dotnet pack'
inputs:
command: pack
packagesToPack: src/KubernetesClient/KubernetesClient.csproj
packDirectory: '$(Build.ArtifactStagingDirectory)/nupkg'
majorVersion: 1
minorVersion: 4
versioningScheme: byPrereleaseNumber
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)/nupkg'