mirror of https://github.com/jenkinsci/jenkins.git
Retry failing Windows builds on non-spot agent (#11052)
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
This commit is contained in:
parent
68e7cdec61
commit
4e76327afe
|
@ -67,7 +67,13 @@ axes.values().combinations {
|
|||
if (platform == 'windows') {
|
||||
agentContainerLabel += '-windows'
|
||||
}
|
||||
int retryCount = 0
|
||||
retry(conditions: [kubernetesAgent(handleNonKubernetes: true), nonresumable()], count: 2) {
|
||||
if (retryCount == 1 && platform == 'windows' ) {
|
||||
agentContainerLabel = agentContainerLabel + '-nonspot'
|
||||
}
|
||||
// Increment before allocating the node in case it fails
|
||||
retryCount++
|
||||
node(agentContainerLabel) {
|
||||
// First stage is actually checking out the source. Since we're using Multibranch
|
||||
// currently, we can use "checkout scm".
|
||||
|
|
Loading…
Reference in New Issue