Use repo build script to restore internal tools (#34830)
authorSantiago Fernandez Madero <safern@microsoft.com>
Fri, 10 Apr 2020 23:05:39 +0000 (16:05 -0700)
committerGitHub <noreply@github.com>
Fri, 10 Apr 2020 23:05:39 +0000 (16:05 -0700)
eng/pipelines/common/restore-internal-tools.yml
eng/pipelines/coreclr/templates/build-corelib-job.yml
eng/pipelines/coreclr/templates/build-job.yml
eng/pipelines/libraries/build-job.yml
global.json

index 9f20996..848c980 100644 (file)
@@ -1,27 +1,14 @@
-parameters:
-  installDotnet: false
-
 steps:
-  - ${{ if eq(parameters.installDotnet, true) }}:
-    - task: UseDotNet@2
-      displayName: Install dotnet ${{ parameters.dotnetVersion }}
-      inputs:
-        packageType: sdk
-        useGlobalJson: true
-        installationPath: $(Agent.TempDirectory)/_dotnet
-
   - task: NuGetAuthenticate@0
     inputs:
       nuGetServiceConnections: 'dotnet-core-internal-tooling'
       forceReinstallCredentialProvider: true
 
-  - task: DotNetCoreCLI@2
+  - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt)
+            -ci
+            -restore
+            -projects $(Build.SourcesDirectory)/eng/common/internal/Tools.csproj
+            /bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/RestoreInternal.binlog
+            /v:normal
     displayName: Restore internal tools
     condition: and(succeeded(), ne(variables['_skipRestoreInternalTools'], 'true'))
-    inputs:
-      command: restore
-      feedsToUse: config
-      projects: 'eng/common/internal/Tools.csproj'
-      nugetConfigPath: 'eng/internal/NuGet.config'
-      restoreDirectory: '$(Build.SourcesDirectory)\.packages'
-      verbosityRestore: 'diagnostic'
\ No newline at end of file
index b846bb3..b2b2c9a 100644 (file)
@@ -74,14 +74,12 @@ jobs:
       - script: $(Build.SourcesDirectory)\eng\common\init-tools-native.cmd -InstallDirectory $(Build.SourcesDirectory)\native-tools -Force
         displayName: Install native dependencies
 
-    # Install internal tools on official builds
-    # Since our internal tools are behind an authenticated feed,
-    # we need to use the DotNetCli AzDO task to restore from the feed using a service connection.
-    # We can't do this from within the build, so we need to do this as a separate step.
+    # Install internal tools on official builds
+    # Since our internal tools are behind an authenticated feed,
+    # we need to use the DotNetCli AzDO task to restore from the feed using a service connection.
+    # We can't do this from within the build, so we need to do this as a separate step.
     - ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')) }}:
       - template: /eng/pipelines/common/restore-internal-tools.yml
-        parameters:
-          installDotnet: true
 
     # Build Private CoreLib
     - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -subset clr.corelib $(crossArg) -arch $(archType) -c $(buildConfig) $(officialBuildIdArg) -ci
index 92ed5a9..b343975 100644 (file)
@@ -115,14 +115,12 @@ jobs:
       - script: $(Build.SourcesDirectory)\eng\common\init-tools-native.cmd -InstallDirectory $(Build.SourcesDirectory)\native-tools -Force
         displayName: Install native dependencies
 
-    # Install internal tools on official builds
-    # Since our internal tools are behind an authenticated feed,
-    # we need to use the DotNetCli AzDO task to restore from the feed using a service connection.
-    # We can't do this from within the build, so we need to do this as a separate step.
+    # Install internal tools on official builds
+    # Since our internal tools are behind an authenticated feed,
+    # we need to use the DotNetCli AzDO task to restore from the feed using a service connection.
+    # We can't do this from within the build, so we need to do this as a separate step.
     - ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')) }}:
       - template: /eng/pipelines/common/restore-internal-tools.yml
-        parameters:
-          installDotnet: true
 
     # Build CoreCLR tools needed by the native runtime build
     - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -subset clr.buildtools $(crossArg) -arch $(archType) -c $(buildConfig) $(officialBuildIdArg) -ci /bl:$(Build.SourcesDirectory)/artifacts/log/clr.buildtools.binlog
index 3a1af6d..26ecca2 100644 (file)
@@ -79,8 +79,6 @@ jobs:
 
         - ${{ if eq(parameters.isOfficialBuild, true) }}:
           - template: /eng/pipelines/common/restore-internal-tools.yml
-            parameters:
-              installDotnet: true
 
         - script: $(_buildScript)
                 -subset $(_subset)
index 3848f8b..1c7dd90 100644 (file)
@@ -1,6 +1,6 @@
 {
   "sdk": {
-    "version": "5.0.100-preview.2.20176.6",
+    "version": "5.0.100-preview.4.20202.8",
     "allowPrerelease": true,
     "rollForward": "major"
   },