Upgrade to RepoToolset version 1.0.0-beta2-63206-01 (#57)
authorMike McLaughlin <mikem@microsoft.com>
Tue, 7 Aug 2018 20:38:46 +0000 (13:38 -0700)
committerGitHub <noreply@github.com>
Tue, 7 Aug 2018 20:38:46 +0000 (13:38 -0700)
Upgrade to RepoToolset version 1.0.0-beta2-63206-01

13 files changed:
Directory.Build.props
eng/Build-Native.cmd
eng/Build.cmd
eng/BuildTask.targets [new file with mode: 0644]
eng/CIBuild.cmd
eng/SignToolData.json
eng/Versions.props
eng/build.yml
eng/cibuild.sh
eng/common/templates/phases/base.yml
eng/common/templates/steps/build-reason.yml [new file with mode: 0644]
global.json
pack.cmd

index 4716da8b1d54f58857d3ddcf025c0f7a489ec6e4..7cb64a97beb1fa1094ad61e0ddf8f2a89accbadd 100644 (file)
@@ -1,12 +1,9 @@
 <!-- Copyright (c)  Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information. -->
 <Project>
   <PropertyGroup>
-    <RepositoryUrl>https://github.com/dotnet/diagnostics.git</RepositoryUrl>
-    <RepositoryRawUrl>$(RepositoryUrl)</RepositoryRawUrl>
     <PackageProjectUrl>$(RepositoryUrl)</PackageProjectUrl>
     <PackageLicenseUrl>http://go.microsoft.com/fwlink/?LinkId=529443</PackageLicenseUrl>
     <PackageIconUrl>http://go.microsoft.com/fwlink/?LinkID=288859</PackageIconUrl>
-    <SourceLinkProvider>GitHub</SourceLinkProvider>
     <NoPackageAnalysis>true</NoPackageAnalysis>
   </PropertyGroup>
 </Project>
index 580f090e3bc5a090261a8bdc4c8daed6a62fde3a..fd9ed8562c91f4f57d6badffe22c66e58ffd29f1 100644 (file)
@@ -331,11 +331,11 @@ echo %__MsgPrefix%Product binaries are available at !__BinDir!
 :: Test components
 if %__Test% EQU 1 (
     :: Install the other versions of .NET Core runtime we are going to test on (2.0.9 and 1.1.9)
-    powershell -ExecutionPolicy ByPass -command "& """%__ProjectDir%\.dotnet\dotnet-install.ps1""" -Version 2.0.9 -Architecture %__BuildArch% -SkipNonVersionedFiles -Runtime dotnet -InstallDir %__ProjectDir%\.dotnet"
-    powershell -ExecutionPolicy ByPass -command "& """%__ProjectDir%\.dotnet\dotnet-install.ps1""" -Version 1.1.9 -Architecture %__BuildArch% -SkipNonVersionedFiles -Runtime dotnet -InstallDir %__ProjectDir%\.dotnet"
+    powershell -ExecutionPolicy ByPass -NoProfile -command "& """%__ProjectDir%\.dotnet\dotnet-install.ps1""" -Version 2.0.9 -Architecture %__BuildArch% -SkipNonVersionedFiles -Runtime dotnet -InstallDir %__ProjectDir%\.dotnet"
+    powershell -ExecutionPolicy ByPass -NoProfile -command "& """%__ProjectDir%\.dotnet\dotnet-install.ps1""" -Version 1.1.9 -Architecture %__BuildArch% -SkipNonVersionedFiles -Runtime dotnet -InstallDir %__ProjectDir%\.dotnet"
 
     :: Run the xunit tests
-    powershell -ExecutionPolicy ByPass -command "& """%__ProjectDir%\eng\common\Build.ps1""" -test -configuration %__BuildType% -verbosity %__Verbosity% %__TestArgs%"
+    powershell -ExecutionPolicy ByPass -NoProfile -command "& """%__ProjectDir%\eng\common\Build.ps1""" -test -configuration %__BuildType% -verbosity %__Verbosity% %__TestArgs%"
     exit /b %ERRORLEVEL
 )
 exit /b 0
index 8c433a99131f4f62e3471cd8f7347b945f41d58c..16bbed608e7688143759494444c60ef9fee9c6cf 100644 (file)
@@ -6,7 +6,7 @@ set "__args=%*"
 set "__args=%__args:-test=%"
 
 :: build managed components
-powershell -ExecutionPolicy ByPass -command "& """%~dp0common\Build.ps1""" %__args%"
+powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0common\Build.ps1""" %__args%"
 if NOT '%ERRORLEVEL%' == '0' exit /b %ERRORLEVEL%
 
 :: build native componments and test managed/native
diff --git a/eng/BuildTask.targets b/eng/BuildTask.targets
new file mode 100644 (file)
index 0000000..6f3b536
--- /dev/null
@@ -0,0 +1,71 @@
+<Project>
+  <PropertyGroup>
+    <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
+  </PropertyGroup>
+
+  <PropertyGroup>
+    <IncludeBuildOutput>false</IncludeBuildOutput>
+    <IsPackable>true</IsPackable>
+  </PropertyGroup>
+
+  <!--
+    Default to including all *.props and *.targets files
+    from the project directory into the NuGet package root
+  -->
+  <ItemGroup Condition="'$(EnableDefaultItems)' != 'false'">
+    <None Condition="'$(EnableDefaultNoneItems)' != 'false'"
+          Include="**/*.props;**/*.targets" Pack="true">
+      <PackagePath>%(RecursiveDir)%(Filename)%(Extension)</PackagePath>
+    </None>
+  </ItemGroup>
+
+  <ItemGroup>
+    <None Include="$(RepoRoot)LICENSE.txt" PackagePath="LICENSE.txt" Pack="true"/>
+    <None Include="$(RepoRoot)THIRD-PARTY-NOTICES.txt" PackagePath="THIRD-PARTY-NOTICES.txt" Pack="true"/>
+  </ItemGroup>
+
+  <ItemGroup>
+    <!--
+      Update all PackageReference and ProjectReference Items to have
+      PrivateAssets="All" and default Publish to true
+      This removes the dependency nodes from the generated nuspec and
+      forces the publish output to contain the dlls.
+     -->
+    <PackageReference Update="@(PackageReference)">
+      <PrivateAssets>All</PrivateAssets>
+      <Publish Condition=" '%(PackageReference.Publish)' != 'false' ">true</Publish>
+      <ExcludeAssets Condition=" '%(PackageReference.Publish)' == 'false' ">runtime</ExcludeAssets>
+    </PackageReference>
+    <ProjectReference Update="@(ProjectReference)">
+      <PrivateAssets>All</PrivateAssets>
+      <Publish Condition=" '%(ProjectReference.Publish)' != 'false' ">true</Publish>
+    </ProjectReference>
+    <!--
+      Update all Reference items to have Pack="false"
+      This removes the frameworkDependency nodes from the generated nuspec
+    -->
+    <Reference Update="@(Reference)">
+      <Pack>false</Pack>
+    </Reference>
+  </ItemGroup>
+
+  <!--
+    if $(IncludePublishOutput) it not 'false' add Publish as a dependency to Pack
+    and include TfmSpecificPackageFile items for all published files
+  -->
+  <PropertyGroup Condition="'$(IncludePublishOutput)' != 'false'">
+    <TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);CollectAssets</TargetsForTfmSpecificContentInPackage>
+  </PropertyGroup>
+  <Target Name="CollectAssets" DependsOnTargets="Publish">
+    <RemoveDuplicates Inputs="@(ResolvedFileToPublish)">
+      <Output TaskParameter="Filtered" ItemName="FilteredFileToPublish"/>
+    </RemoveDuplicates>
+    <ItemGroup>
+      <TfmSpecificPackageFile
+        Include="@(FilteredFileToPublish->'$([MSBuild]::NormalizeDirectory($(PublishDir)))%(RelativePath)')"
+        Condition="'%(FilteredFileToPublish.AssetType)' != 'resources'">
+        <PackagePath>tools/$(TargetFramework)/%(FilteredFileToPublish.RelativePath)</PackagePath>
+      </TfmSpecificPackageFile>
+    </ItemGroup>
+  </Target>
+</Project>
index 82ecb68a5ed817bc0e6c386f5137d0009ebdf727..2cd76c23c800793340bb04479defd2557853d508 100644 (file)
@@ -1,3 +1,3 @@
 @echo off
-call %~dp0Build.cmd -restore -build -test -ci %*
+call %~dp0Build.cmd -restore -build -test -publish -sign -pack -ci %*
 exit /b %ErrorLevel%
index 6de1857c58113939979a713625201624331298e5..aede136932e065ee111d71d20fe9bd3b76b126f1 100644 (file)
@@ -5,13 +5,14 @@
       "strongName": "MsSharedLib72",
       "values": [
         "bin/SOS.NETCore/netcoreapp1.0/SOS.NETCore.dll",
+        "bin/Microsoft.Diagnostic.TestHelpers/netcoreapp2.0/Microsoft.Diagnostic.TestHelpers.dll"
       ]
     },
     {
       "certificate": "NuGet",
       "strongName": null,
       "values": [
-        "packages/*.nupkg"
+        "packages/Shipping/*.nupkg"
       ]
     }
   ],
@@ -20,6 +21,6 @@
     "Microsoft.SymbolStore.dll",
     "System.Collections.Immutable.dll",
     "System.Net.Http.dll",
-    "System.Reflection.Metadata.dll",
+    "System.Reflection.Metadata.dll"
   ]
 }
index 921d6ace7f8c73b265da1e35a598324633fc12a7..50a3d66130e77dba45bbd8f7dae422b6ce7e55c8 100644 (file)
@@ -7,6 +7,8 @@
     <VersionPrefix>1.0.0</VersionPrefix>
     <PreReleaseVersionLabel>beta</PreReleaseVersionLabel>
   
+    <RoslynToolsSignToolVersion>1.0.0-beta2-63127-01</RoslynToolsSignToolVersion>
+    <MicrosoftNetCompilersVersion>2.8.0-beta6-62830-08</MicrosoftNetCompilersVersion>
     <UsingToolNetFrameworkReferenceAssemblies>true</UsingToolNetFrameworkReferenceAssemblies>
     <UsingToolXliff>false</UsingToolXliff>
 
@@ -17,8 +19,6 @@
   <PropertyGroup>
     <RestoreSources>
       $(RestoreSources);
-      https://dotnet.myget.org/F/symstore/api/v3/index.json;
-      https://dotnet.myget.org/F/roslyn-tools/api/v3/index.json;
       https://dotnet.myget.org/F/dotnet-core/api/v3/index.json;
       https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json
     </RestoreSources>
index 5230bc2283ee19afb44d4a1d47badf3141a5da32..17a66c285c454a131b6f63a40ba44d16f9953fc6 100644 (file)
 parameters:
   phaseName: ''
   agentOs: Windows_NT
-  buildReason: IndividualCI
-  queue: {}
   dockerImage: ''
   enableTelemetry: true
+  queue: {}
   useEsrpSigning: true
 
 phases:
 - template: /eng/common/templates/phases/base.yml
   parameters:
     agentOs: ${{ parameters.agentOs }}
-    buildReason: ${{ parameters.buildReason }}
     buildConfig: $(_BuildConfig)
     phaseName: ${{ parameters.phaseName }}
     enableTelemetry: ${{ parameters.enableTelemetry }}
-    fetchDepth: 5
     helixType: build/product
-    ${{ if notIn(parameters.buildReason, 'IndividualCI', 'BatchedCI', 'PullRequest') }}:
+    ${{ if notIn(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'PullRequest') }}:
       helixSource: official/dotnet/arcade/$(Build.SourceBranch)
-    ${{ if in(parameters.buildReason, 'IndividualCI', 'BatchedCI', 'PullRequest') }}:
+    ${{ if in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'PullRequest') }}:
       helixSource: pr/dotnet/arcade/$(Build.SourceBranch)
     phase:
       queue: ${{ parameters.queue }}
       variables: 
         _DockerImageName: ${{ parameters.dockerImage }}
         _PhaseName : ${{ parameters.phaseName }}
-        ${{ if notIn(parameters.buildReason, 'IndividualCI', 'BatchedCI', 'PullRequest') }}:
-          _PublishBlobFeedUrl: https://dotnetfeed.blob.core.windows.net/dotnet-tools-internal/index.json
+        ${{ if notIn(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'PullRequest') }}:
+          _PublishBlobFeedUrl: https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json
           _TeamName: DotNetCore
           _UseEsrpSigning: ${{ parameters.useEsrpSigning }}
-        ${{ if notIn(parameters.buildReason, 'IndividualCI', 'BatchedCI', 'PullRequest') }}:
+        ${{ if notIn(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'PullRequest') }}:
           _PublishArgs: /p:PB_PublishBlobFeedKey=$(dotnetfeed-storage-access-key-1) 
             /p:PB_PublishBlobFeedUrl=$(_PublishBlobFeedUrl) 
             /p:PB_PublishType=$(_PublishType) 
-        ${{ if in(parameters.buildReason, 'IndividualCI', 'BatchedCI', 'PullRequest') }}:
+        ${{ if in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'PullRequest') }}:
           _PublishArgs: ''
 
       steps:
-      - ${{ if eq(parameters.agentOs, 'Windows_NT') }}:
-          - ${{ if notIn(parameters.buildReason, 'IndividualCI', 'BatchedCI', 'PullRequest') }}:
-            - task: ms-vseng.MicroBuildTasks.30666190-6959-11e5-9f96-f56098202fef.MicroBuildSigningPlugin@1
-              displayName: Install MicroBuild plugin
-              inputs:
-                signType: $(_SignType)
-                zipSources: false
-                esrpSigning: $(_UseEsrpSigning)
-              env:
-                TeamName: $(_TeamName)
-              continueOnError: false
-              condition: and(succeeded(), in(variables._SignType, 'real', 'test'))
-
-            - task: AzureKeyVault@1
-              inputs:
-                azureSubscription: 'DotNet-Engineering-Services_KeyVault'
-                KeyVaultName: EngKeyVault
-                SecretsFilter: 'dotnetfeed-storage-access-key-1'
-              condition: succeeded()
-
-          - script: $(Build.SourcesDirectory)\eng\cibuild.cmd 
+      - template: /eng/common/templates/steps/run-on-windows.yml
+        parameters:
+          agentOs: ${{ parameters.agentOs }} 
+          steps:
+          - template: /eng/common/templates/steps/build-reason.yml
+            parameters:
+              conditions: not IndividualCI,BatchedCI,PullRequest
+              steps:
+              - task: ms-vseng.MicroBuildTasks.30666190-6959-11e5-9f96-f56098202fef.MicroBuildSigningPlugin@1
+                displayName: Install MicroBuild plugin
+                inputs:
+                  signType: $(_SignType)
+                  zipSources: false
+                  esrpSigning: $(_UseEsrpSigning)
+                env:
+                  TeamName: $(_TeamName)
+                continueOnError: false
+                condition: and(succeeded(), in(variables._SignType, 'real', 'test'))
+              - task: AzureKeyVault@1
+                inputs:
+                  azureSubscription: 'DotNet-Engineering-Services_KeyVault'
+                  KeyVaultName: EngKeyVault
+                  SecretsFilter: 'dotnetfeed-storage-access-key-1'
+                condition: succeeded()
+          - script: $(Build.SourcesDirectory)\eng\cibuild.cmd
               -configuration $(_BuildConfig) 
               -architecture $(_BuildArch)
               -prepareMachine 
               /p:SignType=$(_SignType)
               $(_PublishArgs)
+            name: Build_Test
             displayName: Build / Test
             env:
               OfficialBuildId: $(BUILD.BUILDNUMBER)
@@ -83,12 +85,12 @@ phases:
             --docker-image $(_DockerImageName)
             --source-directory $(Build.SourcesDirectory)
             --container-name diagnostics-$(Build.BuildId)
-            --restore --build --test
             --configuration $(_BuildConfig) 
             --architecture $(_BuildArch)
             --prepareMachine 
             /p:SignType=$(_SignType)
             $(_PublishArgs)
+          name: Build_Test
           displayName: Docker Build / Test
           env:
             OfficialBuildId: $(BUILD.BUILDNUMBER)
@@ -96,37 +98,38 @@ phases:
 
       - ${{ if eq(parameters.agentOs, 'Darwin') }}:
         - script: $(Build.SourcesDirectory)/eng/cibuild.sh
-            --restore --build --test
             --configuration $(_BuildConfig) 
             --architecture $(_BuildArch)
             --prepareMachine
             /p:SignType=$(_SignType)
             $(_PublishArgs)
+          name: Build_Test
           displayName: Build / Test
           env:
             OfficialBuildId: $(BUILD.BUILDNUMBER)
           condition: succeeded()
 
-      - ${{ if notIn(parameters.buildReason, 'IndividualCI', 'BatchedCI', 'PullRequest') }}:
-        - task: CopyFiles@2
-          displayName: Gather Logs
-          inputs:
-            SourceFolder: '$(Build.SourcesDirectory)/artifacts'
-            Contents: '**/*log'
-            TargetFolder: '$(Build.StagingDirectory)/BuildLogs'
-          continueOnError: true
-          condition: always()
+      - template: /eng/common/templates/steps/build-reason.yml
+        parameters:
+          conditions: not IndividualCI,BatchedCI,PullRequest
+          steps:
+          - task: CopyFiles@2
+            displayName: Gather Logs
+            inputs:
+              SourceFolder: '$(Build.SourcesDirectory)/artifacts'
+              Contents: '**/*log'
+              TargetFolder: '$(Build.StagingDirectory)/BuildLogs'
+            continueOnError: true
+            condition: always()
 
-        - task: PublishBuildArtifacts@1
-          displayName: Publish Logs to VSTS
-          inputs:
-            PathtoPublish: '$(Build.StagingDirectory)/BuildLogs'
-            PublishLocation: Container
-            # Should be able to use a single definition of ArtifactName here instead of conditioned on 
-            # agentOs once variables are available in the template evaluation context.  
-            ${{ if eq(parameters.agentOs, 'Windows_NT') }}:
-              ArtifactName: Windows_NT_$(Agent.JobName)
-            ${{ if ne(parameters.agentOs, 'Windows_NT') }}:
-              ArtifactName: Linux_$(_PhaseName)_$(Agent.JobName)
-          continueOnError: true
-          condition: always()
+          - task: PublishBuildArtifacts@1
+            displayName: Publish Logs to VSTS
+            inputs:
+              PathtoPublish: '$(Build.StagingDirectory)/BuildLogs'
+              PublishLocation: Container
+              ${{ if eq(parameters.agentOs, 'Windows_NT') }}:
+                ArtifactName: Windows_NT_$(Agent.JobName)
+              ${{ if ne(parameters.agentOs, 'Windows_NT') }}:
+                ArtifactName: Linux_$(_PhaseName)_$(Agent.JobName)
+            continueOnError: true
+            condition: always()
index 1291238beb967d6855044a4c949d37c508311888..632885f06df89b34e3485c47250e0632a1e03741 100755 (executable)
@@ -37,7 +37,7 @@ if [ "$__osname" == "Linux" ]; then
     fi
 fi
 
-"$scriptroot/build.sh" --ci $@
+"$scriptroot/build.sh" --restore --build --test --publish --pack --ci $@
 if [[ $? != 0 ]]; then
     exit 1
 fi
index de9c3199592516f1e1b81360ee83a0bfe8cc6b3b..8e137491469913202691f497fa2a32e7b613ae0d 100644 (file)
@@ -13,8 +13,8 @@
 
 parameters:
   agentOs: Windows_NT
-  buildReason: IndividualCI
   buildConfig: ''
+  clean: true
   dockerImage: ''
   enableTelemetry: ''
   fetchDepth: ''
@@ -34,19 +34,25 @@ phases:
       ${{ insert }}: ${{ parameters.phase.variables }}
   steps:
   - checkout: self
-    clean: true
+    clean: ${{ parameters.clean }}
     ${{ if ne(parameters.fetchDepth, '') }}:
       fetchDepth: ${{ parameters.fetchDepth }}
-  - ${{ if notIn(parameters.buildReason, 'IndividualCI', 'BatchedCI', 'PullRequest') }}:
-    - ${{ if eq(parameters.enableTelemetry, 'true') }}:
-      - template: /eng/common/templates/steps/telemetry.yml
-        parameters:
-          agentOs: ${{ parameters.agentOs }}
-          buildConfig: ${{ parameters.buildConfig }}
-          helixSource: ${{ parameters.helixSource }}
-          helixType: ${{ parameters.helixType }}
-          steps: ${{ parameters.phase.steps }}
-    - ${{ if not(eq(parameters.enableTelemetry, 'true')) }}:
+  - template: /eng/common/templates/steps/build-reason.yml
+    parameters:
+      conditions: not IndividualCI,BatchedCI,PullRequest
+      steps:
+      - ${{ if eq(parameters.enableTelemetry, 'true') }}:
+        - template: /eng/common/templates/steps/telemetry.yml
+          parameters:
+            agentOs: ${{ parameters.agentOs }}
+            buildConfig: ${{ parameters.buildConfig }}
+            helixSource: ${{ parameters.helixSource }}
+            helixType: ${{ parameters.helixType }}
+            steps: ${{ parameters.phase.steps }}
+      - ${{ if not(eq(parameters.enableTelemetry, 'true')) }}:
+        - ${{ parameters.phase.steps }}
+  - template: /eng/common/templates/steps/build-reason.yml
+    parameters:
+      conditions: IndividualCI,BatchedCI,PullRequest
+      steps:
       - ${{ parameters.phase.steps }}
-  - ${{ if in(parameters.buildReason, 'IndividualCI', 'BatchedCI', 'PullRequest') }}:
-    - ${{ parameters.phase.steps }}
diff --git a/eng/common/templates/steps/build-reason.yml b/eng/common/templates/steps/build-reason.yml
new file mode 100644 (file)
index 0000000..eba5810
--- /dev/null
@@ -0,0 +1,12 @@
+# build-reason.yml
+# Description: runs steps if build.reason condition is valid.  conditions is a string of valid build reasons 
+# to include steps (',' separated).
+parameters:
+  conditions: ''
+  steps: []
+
+steps:
+  - ${{ if and( not(startsWith(parameters.conditions, 'not')), contains(parameters.conditions, variables['build.reason'])) }}:
+    - ${{ parameters.steps }}
+  - ${{ if and( startsWith(parameters.conditions, 'not'), not(contains(parameters.conditions, variables['build.reason']))) }}:
+    - ${{ parameters.steps }}
index d612380d1c5bbd8b65e033410f1700e3f7737162..aa15e36a5b5a2222e3c77c9c12d59ce5f88ae448 100644 (file)
@@ -3,6 +3,6 @@
     "version": "2.1.300"
   },
   "msbuild-sdks": {
-    "RoslynTools.RepoToolset": "1.0.0-beta2-62810-01"
+    "RoslynTools.RepoToolset": "1.0.0-beta2-63206-01"
   }
 }
index 59ccd0fdf37c57d209c5f8de55079d72fc35960d..421727fe146f4a913679ca603d311a86744c51b5 100644 (file)
--- a/pack.cmd
+++ b/pack.cmd
@@ -1,3 +1,3 @@
 @echo off
-powershell -ExecutionPolicy ByPass -command "& """%~dp0eng\common\Build.ps1""" -pack %*"
+powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0eng\common\Build.ps1""" -pack %*"
 exit /b %ErrorLevel%