This repository has been archived by the owner on Mar 27, 2020. It is now read-only.
forked from kubernetes-client/csharp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.azure-pipelines.yaml
121 lines (106 loc) · 3.58 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
jobs:
- job: xamarin_build
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: windows_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: 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'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)/nupkg'
- job: macos_build
pool:
vmImage: 'xcode9-macos10.13'
steps:
- script: |
brew install coreutils
which realpath
./ci.sh
displayName: 'Build & Test'
- task: PublishTestResults@1
displayName: 'Publish Test Results'
inputs:
testRunner: VSTest
testResultsFiles: '$(Build.SourcesDirectory)/tests/**/*.xunit.trx'
condition: succeededOrFailed()
- task: PublishCodeCoverageResults@1
displayName: 'publish coverage results'
inputs:
codeCoverageTool: 'cobertura'
summaryFileLocation: '$(Build.SourcesDirectory)/tests/coveragereport/Cobertura.xml'
reportDirectory: '$(Build.SourcesDirectory)/tests/coveragereport/'
condition: succeededOrFailed()
#- job: ubuntu_build
# pool:
# vmImage: 'ubuntu-16.04'
# steps:
# - script: |
# ./install-linux.sh
# displayName: 'Install .NET & set up minikube'
#
# - script: |
# ./ci.sh
# displayName: 'Build & Test'
#
# - task: PublishTestResults@1
# displayName: 'Publish Test Results'
# inputs:
# testRunner: VSTest
# testResultsFiles: '$(Build.SourcesDirectory)/tests/**/*.xunit.trx'
# condition: succeededOrFailed()
#
# - task: PublishCodeCoverageResults@1
# displayName: 'publish coverage results'
# inputs:
# codeCoverageTool: 'cobertura'
# summaryFileLocation: '$(Build.SourcesDirectory)/tests/coveragereport/Cobertura.xml'
# reportDirectory: '$(Build.SourcesDirectory)/tests/coveragereport/'
# condition: succeededOrFailed()