From b993a18a238fad536398b12d5e808f41edc28122 Mon Sep 17 00:00:00 2001 From: AdamBrousseau Date: Fri, 26 Feb 2021 09:30:24 -0500 Subject: [PATCH] Remove waitForANodeToBecomeActive post-parallel (#2312) This step is unnecessary now that we run on any node. Also remove function as it was only used for this step. Follow up to #2295 Signed-off-by: Adam Brousseau --- buildenv/jenkins/JenkinsfileBase | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/buildenv/jenkins/JenkinsfileBase b/buildenv/jenkins/JenkinsfileBase index 90a577189a..de6941b05e 100644 --- a/buildenv/jenkins/JenkinsfileBase +++ b/buildenv/jenkins/JenkinsfileBase @@ -885,11 +885,7 @@ def run_parallel_tests() { if (params.PARALLEL && params.PARALLEL != "None") { stage ("Parallel Tests") { def childJobs = parallel parallel_tests - if (params.ACTIVE_NODE_TIMEOUT && params.ACTIVE_NODE_TIMEOUT.isInteger()) { - waitForANodeToBecomeActive("$LABEL", params.ACTIVE_NODE_TIMEOUT) - } else { - waitForANodeToBecomeActive("$LABEL", "0") - } + node { def buildResult = "" childJobs.each { @@ -918,30 +914,6 @@ def run_parallel_tests() { } } -def waitForANodeToBecomeActive(def label, String activeNodeTimeoutString) { - def nodes = nodesByLabel(label).size() - if (nodes < 1) { - // If no active node matches the label, we see if there's a timeout value set. - // If there is, we wait and check again periodically. If not, we fail immediately. - - int activeNodeTimeout = activeNodeTimeoutString as Integer - - echo "Cannot find an active node matching this label: " + label - echo "Will now wait until " + activeNodeTimeoutString + " minutes (ACTIVE_NODE_TIMEOUT) has passed, re-checking periodically." - - while (activeNodeTimeout > 0) { - sleep(60 * 1000) // 1 minute sleep - activeNodeTimeout-- - if (nodesByLabel(LABEL).size() > 0) { - echo "A node matching the aforementioned label has become active." - return - } - } - - assert false : "Timed out waiting for a machine that matches the LABEL: " + LABEL + " to become active." - } -} - def getGitRepoBranch(ownerBranch, defaultOwnerBranch, repo) { String[] actualRepoBranch = defaultOwnerBranch.split(":") if (ownerBranch) {