Skip to content

Commit fc1467f

Browse files
committed
try out pipeline lib PoC
1 parent f0d68c0 commit fc1467f

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

Jenkinsfile

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@Library('pipeline-library@pull/980/head') _
2+
13
final String cronExpr = env.BRANCH_IS_PRIMARY ? '@daily' : ''
24

35
properties([
@@ -13,10 +15,10 @@ def agentSelector(String imageType, spotRetryCounter) {
1315
case ~/linux|alpine*|debian*|rhel*/:
1416
// Need Docker and a LOT of memory for faster builds (due to multi archs)
1517
platform = 'docker-highmem'
16-
// Fallback to 'linux' on trusted.ci
17-
if (infra.isTrusted()) {
18-
platform = 'linux'
19-
}
18+
// // Fallback to 'linux' on trusted.ci
19+
// if (infra.isTrusted()) {
20+
// platform = 'linux'
21+
// }
2022
break
2123

2224
// TODO: to be removed later cf https://github.com/jenkins-infra/helpdesk/issues/4954
@@ -38,18 +40,20 @@ def agentSelector(String imageType, spotRetryCounter) {
3840
}
3941

4042
// Defined in https://github.com/jenkins-infra/pipeline-library/blob/master/vars/infra.groovy
41-
def agentLabel = infra.getBuildAgentLabel(platform, 'any', false)
43+
def agentLabel = infra.getBuildAgentLabel(platform, 'any', false, spotRetryCounter)
4244

43-
// Spot/Non-spot
44-
if (infra.isTrusted()) {
45-
return agentLabel
46-
}
45+
// // Spot/Non-spot
46+
// if (infra.isTrusted()) {
47+
// return agentLabel
48+
// }
4749

48-
if (spotRetryCounter > 1) {
49-
return agentLabel + ' && nonspot'
50-
}
50+
// if (spotRetryCounter > 1) {
51+
// return agentLabel + ' && nonspot'
52+
// }
53+
54+
// return agentLabel + ' && spot'
5155

52-
return agentLabel + ' && spot'
56+
return agentLabel
5357
}
5458

5559
// Specify parallel stages

0 commit comments

Comments
 (0)