Restore internal tools using .net core restore (dotnet/corefx#36840)
authorSantiago Fernandez Madero <safern@microsoft.com>
Mon, 15 Apr 2019 16:03:58 +0000 (11:03 -0500)
committerGitHub <noreply@github.com>
Mon, 15 Apr 2019 16:03:58 +0000 (11:03 -0500)
* Restore internal tools using .net core restore

* Restore internal tools from dnceng-internal

Bump TestILC version

* Manual Darc update from build '20190414.2'

* Add buildExtraArguments to common

Commit migrated from https://github.com/dotnet/corefx/commit/10d7d6f812295a572eb148aedb19efd2f96fbe17

eng/InternalTools.props
eng/pipelines/libraries/corefx-base.yml
eng/pipelines/libraries/windows.yml

index db0a13d..b16d4b4 100644 (file)
@@ -14,8 +14,8 @@
   <PropertyGroup>
     <!-- Reset the restore config file set by arcade. -->
     <RestoreConfigFile></RestoreConfigFile>
-    <RestoreSources>
-      https://devdiv.pkgs.visualstudio.com/_packaging/dotnet-core-internal-tooling/nuget/v3/index.json;
+    <RestoreSources Condition="'$(UsingILCTools)' == 'true'">
+      https://dnceng.pkgs.visualstudio.com/_packaging/dotnet-internal/nuget/v3/index.json;
       $(RestoreSources);
     </RestoreSources>
   </PropertyGroup>
index ca9b656..67a02a0 100644 (file)
@@ -74,11 +74,14 @@ jobs:
 
         - _msbuildCommonParameters: ''
         - _archiveTestsParameter: ''
+        - _finalFrameworkArg: -framework $(_framework)
+
+        - ${{ if ne(job._jobFramework, '')}}:
+          - _finalFrameworkArg: ${{ job._jobFramework }}
 
         - ${{ if eq(parameters.isOfficialBuild, 'true') }}:
           - _msbuildCommonParameters: /p:OfficialBuildId=$(Build.BuildNumber)
           - _dotnetFeedUrl: https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json
-          - group: DotNet-Internal-Tools-Feed
           - group: DotNet-Blob-Feed
 
         - ${{ if eq(job.submitToHelix, 'true') }}:
@@ -86,7 +89,7 @@ jobs:
           - ${{ if eq(parameters.isOfficialBuild, 'true') }}:
             - group: DotNet-HelixApi-Access
 
-        - _args: -restore -build -configuration $(_BuildConfig) -ci -buildtests -arch $(_architecture) -framework $(_framework) $(_archiveTestsParameter)
+        - _args: -configuration $(_BuildConfig) -ci -arch $(_architecture) $(_finalFrameworkArg) $(_archiveTestsParameter) ${{ job.buildExtraArguments }}
         - _commonArguments: $(_args)
 
         # Windows variables
@@ -124,30 +127,30 @@ jobs:
           - ${{ if ne(job.preBuildSteps[0], '') }}:
             - ${{ job.preBuildSteps }}
 
+          - script: $(_buildScript) -restore $(_commonArguments)
+            displayName: Restore Build Tools
+
           - ${{ if eq(parameters.isOfficialBuild, 'true') }}:
-            - task: NuGetToolInstaller@0
-              inputs:
-                versionSpec: '4.9.2'
-              condition: ne(variables['_skipRestoreInternalTools'], 'true')
-            - task: NuGetCommand@2
+            - task: DotNetCoreCLI@2
               displayName: Restore internal tools
+              condition: ne(variables['_skipRestoreInternalTools'], 'true')
               inputs:
                 command: restore
                 feedsToUse: config
-                restoreSolution: 'eng\common\internal\Tools.csproj'
-                nugetConfigPath: 'NuGet.config'
+                projects: 'eng/common/internal/Tools.csproj'
+                nugetConfigPath: 'eng/internal/NuGet.config'
                 restoreDirectory: '$(Build.SourcesDirectory)\.packages'
+                verbosityRestore: 'normal'
+                externalFeedCredentials: 'dotnet-core-internal-tooling'
               env:
-                VSS_NUGET_EXTERNAL_FEED_ENDPOINTS: '{"endpointCredentials": [{"endpoint":"https://devdiv.pkgs.visualstudio.com/_packaging/8f470c7e-ac49-4afe-a6ee-cf784e438b93/nuget/v3/index.json","username":"dn-bot","password":"$(dn-bot-devdiv-nuget-feed-read)"},
-                                                                             {"endpoint":"https://devdiv.pkgs.visualstudio.com/_packaging/97a41293-2972-4f48-8c0e-05493ae82010/nuget/v3/index.json","username":"dn-bot","password":"$(dn-bot-devdiv-nuget-feed-read)"},
-                                                                             {"endpoint":"https://devdiv.pkgs.visualstudio.com/_packaging/VS/nuget/v3/index.json","username":"dn-bot","password":"$(dn-bot-devdiv-nuget-feed-read)"}]}'
                 TargetGroup: $(_framework)
 
           - ${{ if eq(job.customBuildSteps[0], '') }}:
             - script: $(_buildScript)
+                    -build
+                    -buildtests
                     $(_commonArguments)
                     /p:OuterLoop=$(_outerloop)
-                    ${{ job.buildExtraArguments }}
                     $(_msbuildCommonParameters)
               displayName: Build Sources and Tests
 
index e7823f8..b165a2a 100644 (file)
@@ -166,6 +166,7 @@ jobs:
             name: Hosted VS2017
 
         submitToHelix: true
+        buildExtraArguments: /p:RuntimeOS=win10
         # azure pipelines reporter only supports xunit results based tests.
         enableAzurePipelinesReporter: false
 
@@ -176,9 +177,9 @@ jobs:
           - ${{ if eq(parameters.isOfficialBuild, 'true') }}:
             - allConfigurationsQueues: Windows.10.Amd64.ClientRS5
 
+        _jobFramework: -allConfigurations
         customBuildSteps:
           - script: build.cmd
-                    -restore
                     -build
                     -configuration $(_BuildConfig)
                     -ci
@@ -187,7 +188,6 @@ jobs:
                     -arch $(_architecture)
                     /p:RuntimeOS=win10
                     /p:ArchiveTests=Packages
-                    $(_windowsOfficialBuildArguments)
                     $(_msbuildCommonParameters)
             displayName: Build Packages and Tests