-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JENKINS-50392] Get the exit code the correct way #300
Conversation
Use the error websocket stream to get the info
@carlossg would you mind letting me know when this is ready to be tested? |
All tests passing, it's ready with the fabric8 PR |
Awesome, will give it a spin. Thanks! |
@carlossg confirmed working!
No more stray |
anything I can help with this? |
something you can help with is test and +1 at fabric8io/kubernetes-client#1045 |
You can get the latest plugin |
works great!!! my test cases: cxnBuildStage ('env chk') {
withEnv(['VARTOPRINT=vartoprint']) {
if(sh(script: "echo \$VARTOPRINT", returnStdout: true).trim() != 'vartoprint') {
error('env var not propagated to shell')
}
}
}
cxnBuildStage ('sshagent chk') {
sshagent(['ssh-user']) {
if(sh(script: "ssh -o StrictHostKeyChecking=no ssh-user@sshserver 'echo something'", returnStdout: true).trim() != 'something') {
error('nothing printed via ssh')
}
}
}
cxnBuildStage ('withRun') {
docker.image('mysql:5').withRun('-e "MYSQL_ROOT_PASSWORD=my-secret-pw"') { c ->
def mysqlIp = sh(script: "docker inspect -f {{.NetworkSettings.IPAddress}} ${c.id}", returnStdout: true).trim()
timeout(1) {
sh "while ! mysqladmin ping -h${mysqlIp} --silent; do sleep 1; done"
}
}
}
cxnBuildStage ('build') {
sh './gradlew build'
} |
To @balihb and others that received his comment, please do not disclose security issues publicly, use https://issues.jenkins-ci.org/browse/SECURITY |
this is a security issue with this PR. |
The security issue is now public and fixed in 1.7.1, it was not just with this PR |
Use the error websocket stream to get the info
Depends on fabric8io/kubernetes-client#1045