Skip to content

Commit

Permalink
GH-16154 devops changed url (#16185)
Browse files Browse the repository at this point in the history
* Currently the jenkins link not contain a node name. Its not a point to determine labels by that.
* change node label also for PR pipelines - related to 3253c98

TODO: delete the node labels logic if all the builds run ok
  • Loading branch information
valenad1 committed Apr 30, 2024
1 parent cef5321 commit a3ae44d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
18 changes: 4 additions & 14 deletions scripts/jenkins/groovy/buildConfig.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class BuildConfig {
changesMap[COMPONENT_HADOOP] = buildHadoop
changedPythonTests = detectPythonTestChanges(changes)

nodeLabels = NodeLabels.findByBuildURL(context.env.BUILD_URL)
nodeLabels = NodeLabels.LABELS_C1
supportedXGBEnvironments = [
'centos7.3': [
[name: 'CentOS 7.3 Minimal', dockerfile: 'xgb/centos/Dockerfile-centos-minimal', fromImage: 'centos:7.3.1611', targetName: XGB_TARGET_MINIMAL, nodeLabel: getDefaultNodeLabel()],
Expand Down Expand Up @@ -369,13 +369,13 @@ class BuildConfig {
}

static enum NodeLabels {
LABELS_C1('docker && !mr-0xc8', 'mr-0xc9', 'gpu && !2gpu', 'mr-0xk10'), //master or nightly build
LABELS_B4('docker', 'docker', 'gpu && !2gpu', 'docker') //PR build
LABELS_C1('docker && !mr-0xc8', 'mr-0xc9', 'gpu && !2gpu', 'mr-0xk10'), //master or nightly build - use only this one
LABELS_B4('docker', 'docker', 'gpu && !2gpu', 'docker') //PR build - not used

static Map<String, NodeLabels> LABELS_MAP = [
"c1": LABELS_C1,
"g1": LABELS_C1, //mr-0xg1 was set as alias to mr-0xc1
"b4": LABELS_B4
"b4": LABELS_B4 // not used
]

private final String defaultNodeLabel
Expand Down Expand Up @@ -405,16 +405,6 @@ class BuildConfig {
String getGPUBenchmarkNodeLabel() {
return gpuBenchmarkNodeLabel
}

private static NodeLabels findByBuildURL(final String buildURL) {
final String name = buildURL.replaceAll('http://mr-0x', '').replaceAll(':8080.*', '')

if (LABELS_MAP.containsKey(name)) {
return LABELS_MAP.get(name)
} else {
throw new IllegalArgumentException(String.format("Master %s (%s) is unknown", name, buildURL))
}
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion scripts/jenkins/jenkinsfiles/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

final String MODE_PR = 'MODE_PR'
final String MODE_MASTER = 'MODE_MASTER'
final String DEFAULT_NODE_LABEL = 'h2o-3 && docker && !mr-0xc8 && (!micro || micro_21)'
final String DEFAULT_NODE_LABEL = 'h2o-3'
final int HEALTH_CHECK_RETRIES = 5

def defineTestStages = null
Expand Down

0 comments on commit a3ae44d

Please sign in to comment.