-
Bug
-
Resolution: Unresolved
-
Major
-
Jenkins Master - Linux
Remote Host - Linux
Remote Directory - /opt/bix/home/int/Phase1_Automation/
Remote File - TEST_AUTOMATION_New.ksh
While executing the job which takes 3 parameters from the "Build with parameter" option to execute the remotely placed script,it failed with below error :-
org.hidetake.groovy.ssh.session.BadExitStatusException: Command returned exit status 8: ksh
The script works fine when executed on remote host independently.
Pipeline Script
pipeline {
agent {
kubernetes {
// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set
// take job name -1 (dash) - build number length
label "${JOB_NAME.replaceAll("[^a-z0-9A-Z]+", "").replaceAll("^[^a-z0-9A-Z]*", "").take(63 - 1 - BUILD_NUMBER.length())}${BUILD_NUMBER}"
inheritFrom "jenkins-slave"
}
}
stages {
stage("ssh") {
steps {
script {
withCredentials([usernamePassword(credentialsId: "<CRED_ID>", usernameVariable: "USERNAME", passwordVariable: "PASSWORD")])
}
}
}
}
}