1
1
trigger :
2
2
- psSdkJson6
3
3
4
- # Variables:
5
- # 'targetSDK' the dataPlane SDK you want to build (Ex: KeyVault)
6
- # 'scope' should be set in the pipeline definition to 'SDKs/$(targetSDK)/dataPlane'
7
- # 'build.useLatest' indicates whether or not to use build bootstrap files from the LTSBuildTools branch
4
+ variables :
5
+ - name : ProjectFile
6
+ value : eng/data-plane.proj
8
7
9
8
jobs :
10
9
- job : ' Build_Packages'
@@ -13,112 +12,53 @@ jobs:
13
12
vmImage : ' vs2017-win2016'
14
13
15
14
steps :
16
- - script : |
17
- "%ProgramFiles(x86)%\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\sn.exe" -Vr *,31bf3856ad364e35
18
- displayName: 'Allow unsigned build tool'
19
-
20
- - task : MSBuild@1
21
- displayName : ' Init Build'
22
- inputs :
23
- solution : build.proj
24
- msbuildArguments : ' /t:Init /flp:LogFile=msbuild.Initlog;Verbosity=normal /p:UseLatest=$(build.useLatest)'
25
-
26
- - task : MSBuild@1
27
- displayName : ' Build NuGet Package'
15
+ - task : DotNetCoreInstaller@0
16
+ displayName : ' Use .NET Core sdk 2.1.503'
28
17
inputs :
29
- solution : build.proj
30
- msbuildArguments : ' /t:CreateNugetPackage /p:Scope=$(scope) /p:Configuration=Release /clp:ShowTimestamp /flp:Summary;Verbosity=minimal;LogFile=FullBuild.sum /flp1:warningsonly;logfile=FullBuild.wrn /flp2:errorsonly;logfile=FullBuild.err /p:DebugTrace=$(system.debug) /p:CodeSign=false /p:AuthenticodeSign=false /p:RunGlobalReadinessTools=false /p:EnablePreBuildTarget=false /p:EnablePostBuildTarget=false /p:SkipTests=true'
31
-
32
- - script : |
33
- "%ProgramFiles(x86)%\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\sn.exe" -Vu *,31bf3856ad364e35
34
- displayName: 'Clean up unsigned build tool allowance'
35
- condition: always()
18
+ version : 2.1.503
36
19
37
- - task : PublishBuildArtifacts@1
38
- displayName : ' Publish Artifacts '
20
+ - task : DotNetCoreCLI@2
21
+ displayName : ' Build ane Package '
39
22
inputs :
40
- PathtoPublish : ' binaries\packages '
41
- ArtifactName : packages
23
+ command : pack
24
+ packagesToPack : ' $(ProjectFile) '
42
25
43
26
- job : ' Test_Windows'
44
27
45
28
pool :
46
29
vmImage : ' vs2017-win2016'
47
30
48
31
steps :
49
- - script : |
50
- "%ProgramFiles(x86)%\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\sn.exe" -Vr *,31bf3856ad364e35
51
- displayName: 'Allow unsigned build tool'
52
-
53
- - task : MSBuild@1
54
- displayName : ' Init Build'
32
+ - task : DotNetCoreInstaller@0
33
+ displayName : ' Use .NET Core sdk 2.1.503'
55
34
inputs :
56
- solution : build.proj
57
- msbuildArguments : ' /t:Init /flp:LogFile=msbuild.Initlog;Verbosity=normal /p:UseLatest=$(build.useLatest)'
35
+ version : 2.1.503
58
36
59
- - task : MSBuild@1
60
- displayName : ' Run Tests '
37
+ - task : DotNetCoreCLI@2
38
+ displayName : ' Build & Test '
61
39
inputs :
62
- solution : build.proj
63
- msbuildArguments : ' /t:RunTests /p:Scope=$(scope) /p:Configuration=Release /clp:ShowTimestamp /flp:Summary;Verbosity=minimal;LogFile=FullTest.sum /flp1:warningsonly;logfile=FullTest.wrn /flp2:errorsonly;logfile=FullTest.err /p:DebugTrace=$(system.debug) /p:CodeSign=false /p:AuthenticodeSign=false /p:RunGlobalReadinessTools=false /p:EnablePreBuildTarget=false /p:EnablePostBuildTarget=false '
40
+ command : test
41
+ projects : ' $(ProjectFile) '
64
42
65
43
- task : ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
66
44
displayName : ' Component Detection'
67
- # ComponentGovernance is currently unable to run on pull requests of public projects. Running on
45
+ # ComponentGovernance is currently unable to run on pull requests of public projects. Running on
68
46
# scheduled builds should be good enough.
69
47
condition : and(succeeded(), eq(variables['Build.Reason'], 'Schedule'))
70
48
71
- - script : |
72
- "%ProgramFiles(x86)%\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\sn.exe" -Vu *,31bf3856ad364e35
73
- displayName: 'Clean up unsigned build tool allowance'
74
- condition: always()
75
-
76
49
- job : ' Test_Linux'
77
50
78
51
pool :
79
52
vmImage : ' ubuntu-16.04'
80
53
81
54
steps :
82
- - powershell : |
83
- $env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE="true"
84
- $env:DOTNET_CLI_TELEMETRY_OPTOUT="1"
85
-
86
- # this is roughly equivalent to calling "msbuild build.proj /t:Init" on Windows
87
- bash ./tools/linuxScripts/getBuildTools.sh
88
-
89
- foreach ($proj in (dir -r -i *.csproj src/$(scope)))
90
- {
91
- # Have to skip this one because it depends on Windows Cryptography Next Generation (CNG)
92
- if ($proj.Name.Contains("Microsoft.Azure.KeyVault.Tests.csproj"))
93
- {
94
- Write-Host "skipping $proj"
95
- continue
96
- }
97
-
98
- if ($proj.Name.Contains(".Tests.") -or $proj.Name.Contains(".TestFramework."))
99
- {
100
- Write-Host "dotnet test $proj -f netcoreapp2.0 /nodeReuse:false"
101
- dotnet test $proj -f netcoreapp2.0 /nodeReuse:false
102
- if ($LastExitCode -ne 0)
103
- {
104
- Write-Host "audit test $proj failed with exit code $LastExitCode"
105
- exit 1
106
- }
107
- }
108
- else
109
- {
110
- # Can only build netstandard on Linux
111
- Write-Host "dotnet build $proj -f netstandard1.4"
112
- dotnet build $proj -f netstandard1.4
113
- if ($LastExitCode -ne 0)
114
- {
115
- Write-Host "audit built $proj failed with exit code $LastExitCode"
116
- exit 1
117
- }
118
- }
119
- }
55
+ - task : DotNetCoreInstaller@0
56
+ displayName : ' Use .NET Core sdk 2.1.503'
57
+ inputs :
58
+ version : 2.1.503
120
59
60
+ - task : DotNetCoreCLI@2
121
61
displayName : ' Build & Test'
122
-
123
-
124
-
62
+ inputs :
63
+ command : test
64
+ projects : ' $(ProjectFile) '
0 commit comments