Skip to content

Commit

Permalink
Update mgmt yml file
Browse files Browse the repository at this point in the history
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
  • Loading branch information
weshaggard committed Jun 20, 2019
1 parent 776d57d commit 88f304b
Show file tree
Hide file tree
Showing 8 changed files with 111 additions and 32 deletions.
17 changes: 4 additions & 13 deletions .azure-pipelines/mgmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,6 @@ jobs:
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'

steps:
# - task: CmdLine@1
# inputs:
# filename: C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.2 Tools\sn.exe
# arguments: -Vr *,31bf3856ad364e35
# displayName: 'Disable strong name verification'

- task: MSBuild@1
inputs:
solution: build.proj
displayName: 'Install build tools'
- task: MSBuild@1
inputs:
solution: build.proj
Expand All @@ -44,13 +34,13 @@ jobs:
- job: Ubuntu_Build
pool:
vmImage: 'ubuntu-16.04'

steps:
- task: DotNetCoreInstaller@0
displayName: 'Use .NET Core sdk $(DotNetCoreVersion)'
inputs:
version: '$(DotNetCoreVersion)'

- script: dotnet msbuild build.proj /t:RunTests $(LoggingArgs)
displayName: 'Ubuntu Build and Run tests'
- task: PublishTestResults@2
Expand All @@ -59,4 +49,5 @@ jobs:
testResultsFiles: '**/*.trx'
testRunTitle: 'Ubuntu Test Results'
testResultsFormat: 'VSTest'
mergeTestResults: true
mergeTestResults: true

12 changes: 9 additions & 3 deletions build.proj
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
<Project DefaultTargets="Init" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="Directory.Build.props" />
<Import Project="Directory.Build.targets" />
<Project Sdk="Microsoft.Build.Traversal">
<ItemGroup>
<ProjectReference Include="eng\mgmt.proj">
<AdditionalProperties Condition="'$(Scope)' != ''">Scope=$(Scope)</AdditionalProperties>
</ProjectReference>
<ProjectReference Include="eng\service.proj">
<AdditionalProperties Condition="'$(Scope)' != ''">Scope=$(Scope)</AdditionalProperties>
</ProjectReference>
</ItemGroup>
</Project>
10 changes: 8 additions & 2 deletions eng/.docsettings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,12 @@ known_presence_issues:
- ['sdk/mixedreality/Microsoft.Azure.Management.MixedReality','#5499']
- ['sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics','#5499']
- ['sdk/graphrbac/Microsoft.Azure.Graph.RBAC','#5499']

- ['sdk/search','#5499']
- ['sdk/search/Microsoft.Azure.Management.Search','#5499']
- ['sdk/mgmtcommon', '#5499']
- ['sdk\mgmtcommon\TestFramework', '#5499']
- ['sdk\mgmtcommon\Auth\Az.Auth\Az.Auth.Tests\Az.Auth.Net452.Test', '#5499']
- ['sdk\mgmtcommon\Test\ClientRuntime.E2E.Tests', '#5499']

known_content_issues:
- ['README.md','Root readme']
Expand All @@ -176,7 +179,10 @@ known_content_issues:
- ['sdk/batch/Microsoft.Azure.Batch.FilesConventions/README.md','#5499']
- ['sdk/datamigration/Microsoft.Azure.Management.DataMigration/src/README.md','#5499']
- ['sdk/postgresql/Microsoft.Azure.Management.PostgreSQL/src/README.md','#5499']

- ['sdk\mgmtcommon\AppAuthentication\README.md', '#5499']
- ['sdk\mgmtcommon\ClientRuntime.Etw\README.md', '#5499']
- ['sdk\mgmtcommon\ClientRuntime.Log4Net\README.md', '#5499']

# .net climbs upwards. placing these to prevent assigning readmes to the wrong project
package_indexing_exclusion_list:
- 'AutoRest-AzureDotNetSDK'
Expand Down
13 changes: 0 additions & 13 deletions eng/data-plane.proj

This file was deleted.

12 changes: 12 additions & 0 deletions eng/mgmt.proj
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Project DefaultTargets="Build" InitialTargets="VerifyScope" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\Directory.Build.props" />
<Import Project="..\Directory.Build.targets" />

<Target Name="VerifyScope">
<PropertyGroup>
<ScopePath>..\sdk\$(Scope)</ScopePath>
</PropertyGroup>
<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)" />
<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." />
</Target>
</Project>
10 changes: 10 additions & 0 deletions eng/pipelines/mgmt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# DO NOT EDIT THIS FILE
# This file is generated automatically and any changes will be lost.

trigger: none
pr: none

jobs:
- template: templates/jobs/archetype-sdk-mgmt.yml
parameters:
Scope: $(Scope)
67 changes: 67 additions & 0 deletions eng/pipelines/templates/jobs/archetype-sdk-mgmt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
jobs:
- job: Build
variables:
DotNetCoreSDKVersion: '2.2.202'
skipComponentGovernanceDetection: true
pool:
vmImage: windows-2019
steps:
- task: DotNetCoreInstaller@0
displayName: 'Use .NET Core sdk $(DotNetCoreSDKVersion)'
inputs:
version: '$(DotNetCoreSDKVersion)'
- script: dotnet msbuild eng/mgmt.proj /t:CreateNugetPackage /p:PackageOutputPath=$(Build.ArtifactStagingDirectory) /p:Scope=${{parameters.Scope}} /p:ForPublishing=$(ShouldPublish)
displayName: "Build & Package"
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_MULTILEVEL_LOOKUP: 0
- task: PublishPipelineArtifact@0
condition: succeededOrFailed()
inputs:
artifactName: packages
targetPath: $(Build.ArtifactStagingDirectory)
- powershell: |
$releaseTag = "FOR_SIGNING"
if ("$(ShouldPublish)" -eq "true") { $releaseTag = "FOR_PUBLISHING" }
echo "Tagging build with $releaseTag"
echo "##vso[build.addbuildtag]$releaseTag"
displayName: 'Tagging the build'
- job: Test
variables:
DotNetCoreSDKVersion: '2.2.202'
skipComponentGovernanceDetection: true
strategy:
maxParallel: $[ variables['MaxParallelTestJobs'] ]
matrix:
Linux:
OSName: "Linux"
OSVmImage: "ubuntu-16.04"
Windows:
OSName: "Windows"
OSVmImage: "windows-2019"
MacOs:
OSName: "MacOS"
OSVmImage: "macOS-10.13"
pool:
vmImage: "$(OSVmImage)"
steps:
- task: DotNetCoreInstaller@0

displayName: 'Use .NET Core sdk $(DotNetCoreSDKVersion)'
inputs:
version: '$(DotNetCoreSDKVersion)'
- script: dotnet msbuild eng/mgmt.proj /t:RunTests /p:Scope=${{parameters.Scope}} /p:ForPublishing=$(ShouldPublish)
displayName: "Build & Test"
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_MULTILEVEL_LOOKUP: 0
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testResultsFiles: "**/*.trx"
testRunTitle: "$(OSName) Test Results"
testResultsFormat: "VSTest"
mergeTestResults: true
2 changes: 1 addition & 1 deletion eng/service.proj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
</PropertyGroup>

<ItemGroup>
<ExcludeMgmtLib Include="..\sdk\$(ServiceDirectory)\*.Management.*\**\*.csproj" />
<ExcludeMgmtLib Include="..\sdk\$(ServiceDirectory)\*.Management.*\**\*.csproj;..\sdk\*mgmt*\**\*.csproj" />
<ProjectReference Include="..\sdk\$(ServiceDirectory)\**\*.csproj" Exclude="@(ExcludeMgmtLib)"/>
</ItemGroup>
<Import Project="..\sdk\$(ServiceDirectory)\*.projects" />
Expand Down

0 comments on commit 88f304b

Please sign in to comment.