Correct win-arm64 build machine affinity
authorSteve MacLean <Steve.MacLean@Microsoft.com>
Thu, 6 Dec 2018 23:28:35 +0000 (18:28 -0500)
committerSteve MacLean <stmaclea@microsoft.com>
Fri, 7 Dec 2018 00:08:44 +0000 (19:08 -0500)
Commit migrated from https://github.com/dotnet/core-setup/commit/f0b854016ffd44a512067ee9c2675377a381f6b8

src/installer/netci.groovy

index 8a086c6..9808dc8 100644 (file)
@@ -26,6 +26,21 @@ def static getBuildJobName(def configuration, def os, def architecture) {
     return configuration.toLowerCase() + '_' + os.toLowerCase() + '_' + architecture.toLowerCase()
 }
 
+def static setMachineAffinity(def job, def os, def architecture) {
+    assert os instanceof String
+    assert architecture instanceof String
+
+    if ((os != 'Windows_NT') || (architecture != 'arm64')) {
+        Utilities.setMachineAffinity(job, os, 'latest-or-auto')
+
+        return
+    }
+
+    job.with {
+        label('Windows.10.Amd64.ClientRS4.DevEx.Open')
+    }
+}
+
 platformList.each { platform ->
     // Calculate names
     def (os, architecture, configuration) = platform.tokenize(':')
@@ -34,7 +49,6 @@ platformList.each { platform ->
     def jobName = getBuildJobName(configuration, os, architecture)
     def buildCommand = '';
     def osForGHTrigger = os
-    def version = "latest-or-auto"
     def dockerRepository = "microsoft/dotnet-buildtools-prereqs"
     def dockerContainer = ''
     def dockerWorkingDirectory = "/src/core-setup"
@@ -112,7 +126,7 @@ platformList.each { platform ->
         }
     }
 
-    Utilities.setMachineAffinity(newJob, os, version)
+    setMachineAffinity(newJob, os, architecture)
     Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}")
 
     if (!(architecture == 'arm' || architecture == 'armel' || architecture == 'arm64')) {