Skip to content

Commit fefa02f

Browse files
authored
[TRTINFRA-7326][infra] - Consume SlurmCluster sshPort for clusters with custom SSH port (#9313)
Signed-off-by: Matt Lefebvre <[email protected]>
1 parent 3952a61 commit fefa02f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

jenkins/L0_Test.groovy

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ def uploadResults(def pipeline, SlurmCluster cluster, String nodeName, String st
114114
def remote = [
115115
ip : randomLoginNode,
116116
host : randomLoginNode,
117+
port : cluster.sshPort,
117118
user : "${pipeline.USERNAME}",
118119
passwd : "${pipeline.PASSWORD}",
119120
allowAnyHosts: true,
@@ -126,7 +127,7 @@ def uploadResults(def pipeline, SlurmCluster cluster, String nodeName, String st
126127
pipeline.stage('Submit Test Results') {
127128
sh "mkdir -p ${stageName}"
128129
def resultsFilePath = "/home/svc_tensorrt/bloom/scripts/${nodeName}/results.xml"
129-
def downloadResultCmd = "sshpass -p '${remote.passwd}' scp -r -p ${COMMON_SSH_OPTIONS} ${remote.user}@${remote.host}:${resultsFilePath} ${stageName}/"
130+
def downloadResultCmd = "sshpass -p '${remote.passwd}' scp -P ${remote.port} -r -p ${COMMON_SSH_OPTIONS} ${remote.user}@${remote.host}:${resultsFilePath} ${stageName}/"
130131
downloadSucceed = sh(script: downloadResultCmd, returnStatus: true) == 0
131132
if (downloadSucceed) {
132133
sh "ls ${stageName}"
@@ -400,6 +401,7 @@ def cleanUpSlurmResources(def pipeline, SlurmCluster cluster, String jobUID){
400401
def remote = [
401402
ip : randomLoginNode,
402403
host : randomLoginNode,
404+
port : cluster.sshPort,
403405
user : "${pipeline.USERNAME}",
404406
passwd : "${pipeline.PASSWORD}",
405407
allowAnyHosts: true,
@@ -457,6 +459,7 @@ def cleanUpNodeResources(def pipeline, SlurmCluster cluster, String nodeName, St
457459
def remote = [
458460
ip : randomLoginNode,
459461
host : randomLoginNode,
462+
port : cluster.sshPort,
460463
user : "${pipeline.USERNAME}",
461464
passwd : "${pipeline.PASSWORD}",
462465
allowAnyHosts: true,
@@ -522,6 +525,7 @@ def runLLMTestlistWithAgent(pipeline, platform, testList, config=VANILLA_CONFIG,
522525
def remote = [
523526
ip : randomLoginNode,
524527
host : randomLoginNode,
528+
port : cluster.sshPort,
525529
user : "${pipeline.USERNAME}",
526530
passwd : "${pipeline.PASSWORD}",
527531
allowAnyHosts: true,
@@ -535,7 +539,7 @@ def runLLMTestlistWithAgent(pipeline, platform, testList, config=VANILLA_CONFIG,
535539

536540
Utils.exec(pipeline, script: "chmod +x ${jenkinsSetupPath}", returnStdout: true)
537541

538-
Utils.exec(pipeline, script: "sshpass -p '${remote.passwd}' scp -r -p ${COMMON_SSH_OPTIONS} ${jenkinsSetupPath} ${remote.user}@${remote.host}:~/bloom/scripts/${nodeName}-${entrypoint}", numRetries: 3)
542+
Utils.exec(pipeline, script: "sshpass -p '${remote.passwd}' scp -P ${remote.port} -r -p ${COMMON_SSH_OPTIONS} ${jenkinsSetupPath} ${remote.user}@${remote.host}:~/bloom/scripts/${nodeName}-${entrypoint}", numRetries: 3)
539543

540544
Utils.exec(pipeline, script: "cat ${jenkinsSetupPath}")
541545

@@ -590,6 +594,7 @@ def runLLMTestlistWithAgent(pipeline, platform, testList, config=VANILLA_CONFIG,
590594
def remote = [
591595
ip : randomLoginNode,
592596
host : randomLoginNode,
597+
port : cluster.sshPort,
593598
user : "${pipeline.USERNAME}",
594599
passwd : "${pipeline.PASSWORD}",
595600
allowAnyHosts: true,
@@ -812,6 +817,7 @@ def runLLMTestlistWithSbatch(pipeline, platform, testList, config=VANILLA_CONFIG
812817
def remote = [
813818
ip : randomLoginNode,
814819
host : randomLoginNode,
820+
port : cluster.sshPort,
815821
user : "${pipeline.USERNAME}",
816822
passwd : "${pipeline.PASSWORD}",
817823
allowAnyHosts: true,

0 commit comments

Comments
 (0)