Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 2cac207

Browse files
author
Ian Campbell
committed
Jenkinsfile: constrain all jobs to nodes with the team-local label
Our Jenkins service now supports auto-scalling cloud worker nodes, however these are not always compatible with what we need. In particular they contain nodes labelled `windows` which are configured for Windows containers rather than Linux containers. To avoid this for now we have added a `team-local` label to all of the non-cloud worker nodes (i.e. the ones which are local to the team on the Jenkins server) and this change adds that selector to the pipeline stages. Also add `linux-containers` to the Windows job which expects that (this label was preexisting on the node but not used). Finally, we were inconsistent in the types of quotes being used (double vs single) so since we are touching every line use single quotes for them all. Signed-off-by: Ian Campbell <ijc@docker.com>
1 parent c7ca8bc commit 2cac207

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

Jenkinsfile.baguette

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ properties([buildDiscarder(logRotator(numToKeepStr: '20'))])
22

33
pipeline {
44
agent {
5-
label 'pipeline'
5+
label 'team-local && pipeline'
66
}
77

88
options {
@@ -12,7 +12,7 @@ pipeline {
1212
stages {
1313
stage('Build') {
1414
agent {
15-
label 'linux'
15+
label 'team-local && linux'
1616
}
1717
steps {
1818
dir('src/github.com/docker/app') {
@@ -54,7 +54,7 @@ pipeline {
5454
CODECOV_TOKEN = credentials('jenkins-codecov-token')
5555
}
5656
agent {
57-
label 'linux'
57+
label 'team-local && linux'
5858
}
5959
steps {
6060
dir('src/github.com/docker/app') {
@@ -68,7 +68,7 @@ pipeline {
6868
}
6969
stage("Gradle test") {
7070
agent {
71-
label 'linux'
71+
label 'team-local && linux'
7272
}
7373
steps {
7474
dir('src/github.com/docker/app') {
@@ -82,7 +82,7 @@ pipeline {
8282
}
8383
stage("Test Linux") {
8484
agent {
85-
label 'linux'
85+
label 'team-local && linux'
8686
}
8787
environment {
8888
DOCKERAPP_BINARY = '../docker-app-linux'
@@ -107,7 +107,7 @@ pipeline {
107107
}
108108
stage("Test Mac") {
109109
agent {
110-
label "mac"
110+
label 'team-local && mac'
111111
}
112112
environment {
113113
DOCKERAPP_BINARY = '../docker-app-darwin'
@@ -132,7 +132,7 @@ pipeline {
132132
}
133133
stage("Test Win") {
134134
agent {
135-
label "windows"
135+
label 'team-local && windows && linux-containers'
136136
}
137137
environment {
138138
DOCKERAPP_BINARY = '../docker-app-windows.exe'
@@ -159,7 +159,7 @@ pipeline {
159159
}
160160
stage('Release') {
161161
agent {
162-
label "linux"
162+
label 'team-local && linux'
163163
}
164164
when {
165165
buildingTag()

0 commit comments

Comments
 (0)