From 7470ac09cb0b0a30e0fd2cd928b37e9a1071bf50 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Tue, 17 Nov 2020 08:41:16 +0000 Subject: [PATCH 1/2] [CI] filter static versus ephemeral workers --- Jenkinsfile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5d7dc73b6de8..b7907974a0d9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -687,7 +687,14 @@ def notifyBuildReason() { */ def withNode(def label, Closure body) { def uuid = UUID.randomUUID().toString() - def labels = label?.trim() ? "${label} && extra/${uuid}" : "extra/${uuid}" + def labels + // There are immutable workers and static ones, so the static ones are only metal, macosx and arm + if (label.contains('arm') || label.contains('macosx') || label.contains('metal')) { + labels = label + } else { + // Otherwise use the dynamic UUID for the gobld + labels = label?.trim() ? "${label} && extra/${uuid}" : "extra/${uuid}" + } node("${labels}") { body() } From dc8a6b81bc7839efe56ccae34ed51dc7ba8ec319 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Tue, 17 Nov 2020 10:18:01 +0000 Subject: [PATCH 2/2] As suggested in the code review --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index b7907974a0d9..5fdd36691441 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -683,16 +683,16 @@ def notifyBuildReason() { /** * Guarantee a specific worker can only be used for a specific build. This was not the case -* with the customise node provisioner that reuses workers when there is peak load. +* with the customise node provisioner that reuses workers in some cases when there is a peak load. */ def withNode(def label, Closure body) { - def uuid = UUID.randomUUID().toString() def labels // There are immutable workers and static ones, so the static ones are only metal, macosx and arm if (label.contains('arm') || label.contains('macosx') || label.contains('metal')) { labels = label } else { // Otherwise use the dynamic UUID for the gobld + def uuid = UUID.randomUUID().toString() labels = label?.trim() ? "${label} && extra/${uuid}" : "extra/${uuid}" } node("${labels}") {