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 4958579
Show file tree
Hide file tree
Showing 7 changed files with 102 additions and 30 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>
13 changes: 0 additions & 13 deletions eng/data-plane.proj

This file was deleted.

11 changes: 11 additions & 0 deletions eng/mgmt.proj
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<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)" />
</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 4958579

Please sign in to comment.