Skip to content

Commit ef0bccf

Browse files
authored
Update mgmt yml file (Azure#6623)
Update mgmt yml file to be closer to client yml file still needs to be separate until we can get the mgmt tooling to work with dotnet pack/test commands. Added eng/mgmt.proj which builds all mangment libraries. Updated root build.proj to include both mgmt and client libraries. Remove init step from old mgmt.yml as it is needed any longer Add scope path validation Add support for publishing property
1 parent 776d57d commit ef0bccf

File tree

8 files changed

+111
-32
lines changed

8 files changed

+111
-32
lines changed

.azure-pipelines/mgmt.yml

+4-13
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,6 @@ jobs:
1818
LoggingArgs: '/v:m /clp:ShowtimeStamp /flp:LogFile=msbuild.normal;Verbosity=normal /flp1:Summary;Verbosity=minimal;LogFile=msbuild.sum /flp2:warningsonly;logfile=msbuild.wrn /flp3:errorsonly;logfile=msbuild.err'
1919

2020
steps:
21-
# - task: CmdLine@1
22-
# inputs:
23-
# filename: C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.2 Tools\sn.exe
24-
# arguments: -Vr *,31bf3856ad364e35
25-
# displayName: 'Disable strong name verification'
26-
27-
- task: MSBuild@1
28-
inputs:
29-
solution: build.proj
30-
displayName: 'Install build tools'
3121
- task: MSBuild@1
3222
inputs:
3323
solution: build.proj
@@ -44,13 +34,13 @@ jobs:
4434
- job: Ubuntu_Build
4535
pool:
4636
vmImage: 'ubuntu-16.04'
47-
37+
4838
steps:
4939
- task: DotNetCoreInstaller@0
5040
displayName: 'Use .NET Core sdk $(DotNetCoreVersion)'
5141
inputs:
5242
version: '$(DotNetCoreVersion)'
53-
43+
5444
- script: dotnet msbuild build.proj /t:RunTests $(LoggingArgs)
5545
displayName: 'Ubuntu Build and Run tests'
5646
- task: PublishTestResults@2
@@ -59,4 +49,5 @@ jobs:
5949
testResultsFiles: '**/*.trx'
6050
testRunTitle: 'Ubuntu Test Results'
6151
testResultsFormat: 'VSTest'
62-
mergeTestResults: true
52+
mergeTestResults: true
53+

build.proj

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
<Project DefaultTargets="Init" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2-
<Import Project="Directory.Build.props" />
3-
<Import Project="Directory.Build.targets" />
1+
<Project Sdk="Microsoft.Build.Traversal">
2+
<ItemGroup>
3+
<ProjectReference Include="eng\mgmt.proj">
4+
<AdditionalProperties Condition="'$(Scope)' != ''">Scope=$(Scope)</AdditionalProperties>
5+
</ProjectReference>
6+
<ProjectReference Include="eng\service.proj">
7+
<AdditionalProperties Condition="'$(Scope)' != ''">Scope=$(Scope)</AdditionalProperties>
8+
</ProjectReference>
9+
</ItemGroup>
410
</Project>

eng/.docsettings.yml

+8-2
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,12 @@ known_presence_issues:
153153
- ['sdk/mixedreality/Microsoft.Azure.Management.MixedReality','#5499']
154154
- ['sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics','#5499']
155155
- ['sdk/graphrbac/Microsoft.Azure.Graph.RBAC','#5499']
156-
157156
- ['sdk/search','#5499']
158157
- ['sdk/search/Microsoft.Azure.Management.Search','#5499']
158+
- ['sdk/mgmtcommon', '#5499']
159+
- ['sdk\mgmtcommon\TestFramework', '#5499']
160+
- ['sdk\mgmtcommon\Auth\Az.Auth\Az.Auth.Tests\Az.Auth.Net452.Test', '#5499']
161+
- ['sdk\mgmtcommon\Test\ClientRuntime.E2E.Tests', '#5499']
159162

160163
known_content_issues:
161164
- ['README.md','Root readme']
@@ -176,7 +179,10 @@ known_content_issues:
176179
- ['sdk/batch/Microsoft.Azure.Batch.FilesConventions/README.md','#5499']
177180
- ['sdk/datamigration/Microsoft.Azure.Management.DataMigration/src/README.md','#5499']
178181
- ['sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/README.md','#5499']
179-
182+
- ['sdk\mgmtcommon\AppAuthentication\README.md', '#5499']
183+
- ['sdk\mgmtcommon\ClientRuntime.Etw\README.md', '#5499']
184+
- ['sdk\mgmtcommon\ClientRuntime.Log4Net\README.md', '#5499']
185+
180186
# .net climbs upwards. placing these to prevent assigning readmes to the wrong project
181187
package_indexing_exclusion_list:
182188
- 'AutoRest-AzureDotNetSDK'

eng/data-plane.proj

-13
This file was deleted.

eng/mgmt.proj

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<Project DefaultTargets="Build" InitialTargets="VerifyScope" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<Import Project="..\Directory.Build.props" />
3+
<Import Project="..\Directory.Build.targets" />
4+
5+
<Target Name="VerifyScope">
6+
<PropertyGroup>
7+
<ScopePath>..\sdk\$(Scope)</ScopePath>
8+
</PropertyGroup>
9+
<Error Condition="!Exists('$(ScopePath)')" Text="Scope [$(Scope)] does not exists please specify a path relative to the sdk root directory (i.e. compute, keyvault, etc)" />
10+
<Error Condition="'$(Scope)' == '' and '$(ForPublishing)' == 'true'" Text="Scope cannot be empty you are intending to automatically publish the build output. Please set a Scope and retry." />
11+
</Target>
12+
</Project>

eng/pipelines/mgmt.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# DO NOT EDIT THIS FILE
2+
# This file is generated automatically and any changes will be lost.
3+
4+
trigger: none
5+
pr: none
6+
7+
jobs:
8+
- template: templates/jobs/archetype-sdk-mgmt.yml
9+
parameters:
10+
Scope: $(Scope)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
jobs:
2+
- job: Build
3+
variables:
4+
DotNetCoreSDKVersion: '2.2.202'
5+
skipComponentGovernanceDetection: true
6+
pool:
7+
vmImage: windows-2019
8+
steps:
9+
- task: DotNetCoreInstaller@0
10+
displayName: 'Use .NET Core sdk $(DotNetCoreSDKVersion)'
11+
inputs:
12+
version: '$(DotNetCoreSDKVersion)'
13+
- script: dotnet msbuild eng/mgmt.proj /t:CreateNugetPackage /p:PackageOutputPath=$(Build.ArtifactStagingDirectory) /p:Scope=${{parameters.Scope}} /p:ForPublishing=$(ShouldPublish)
14+
displayName: "Build & Package"
15+
env:
16+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
17+
DOTNET_CLI_TELEMETRY_OPTOUT: 1
18+
DOTNET_MULTILEVEL_LOOKUP: 0
19+
- task: PublishPipelineArtifact@0
20+
condition: succeededOrFailed()
21+
inputs:
22+
artifactName: packages
23+
targetPath: $(Build.ArtifactStagingDirectory)
24+
- powershell: |
25+
$releaseTag = "FOR_SIGNING"
26+
if ("$(ShouldPublish)" -eq "true") { $releaseTag = "FOR_PUBLISHING" }
27+
echo "Tagging build with $releaseTag"
28+
echo "##vso[build.addbuildtag]$releaseTag"
29+
displayName: 'Tagging the build'
30+
31+
- job: Test
32+
variables:
33+
DotNetCoreSDKVersion: '2.2.202'
34+
skipComponentGovernanceDetection: true
35+
strategy:
36+
maxParallel: $[ variables['MaxParallelTestJobs'] ]
37+
matrix:
38+
Linux:
39+
OSName: "Linux"
40+
OSVmImage: "ubuntu-16.04"
41+
Windows:
42+
OSName: "Windows"
43+
OSVmImage: "windows-2019"
44+
MacOs:
45+
OSName: "MacOS"
46+
OSVmImage: "macOS-10.13"
47+
pool:
48+
vmImage: "$(OSVmImage)"
49+
steps:
50+
- task: DotNetCoreInstaller@0
51+
52+
displayName: 'Use .NET Core sdk $(DotNetCoreSDKVersion)'
53+
inputs:
54+
version: '$(DotNetCoreSDKVersion)'
55+
- script: dotnet msbuild eng/mgmt.proj /t:RunTests /p:Scope=${{parameters.Scope}} /p:ForPublishing=$(ShouldPublish)
56+
displayName: "Build & Test"
57+
env:
58+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
59+
DOTNET_CLI_TELEMETRY_OPTOUT: 1
60+
DOTNET_MULTILEVEL_LOOKUP: 0
61+
- task: PublishTestResults@2
62+
condition: succeededOrFailed()
63+
inputs:
64+
testResultsFiles: "**/*.trx"
65+
testRunTitle: "$(OSName) Test Results"
66+
testResultsFormat: "VSTest"
67+
mergeTestResults: true

eng/service.proj

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
</PropertyGroup>
55

66
<ItemGroup>
7-
<ExcludeMgmtLib Include="..\sdk\$(ServiceDirectory)\*.Management.*\**\*.csproj" />
7+
<ExcludeMgmtLib Include="..\sdk\$(ServiceDirectory)\*.Management.*\**\*.csproj;..\sdk\*mgmt*\**\*.csproj" />
88
<ProjectReference Include="..\sdk\$(ServiceDirectory)\**\*.csproj" Exclude="@(ExcludeMgmtLib)"/>
99
</ItemGroup>
1010
<Import Project="..\sdk\$(ServiceDirectory)\*.projects" />

0 commit comments

Comments
 (0)