管道重试时是否启用超时?我尝试了代码..当超过超时时,重试选项正在工作,但没有超时。
stage (‘Build’) {
options {
retry(2)
timeout(time: 10, unit: 'MINUTES')
}
steps {
//code
}
post {
success {
//code
}
}
}
是的,Jenkins 声明性管道中似乎存在错误。这是一个简单的重现:
pipeline {
agent none
stages {
stage('With timeout') {
options {
retry(2)
timeout(time: 5, unit: 'SECONDS')
}
steps {
sleep time: 10, unit: 'SECONDS'
}
}
}
}
它确实不应该成功。