pipeline {
agent { node { label "master" }}
stages {
stage('test') {
steps {
script {
try {
sh "pwd"
} catch (Exception err) {
echo 'test failed'
currentBuild.result = 'FAILURE'
} finally {
cleanWs()
}
}
}
}
}
}
网友评论