Skip to content

Commit 587771f

Browse files
committed
style(jenkins): apply most linter hint
1 parent 8612ab5 commit 587771f

1 file changed

Lines changed: 34 additions & 34 deletions

File tree

infra/jenkins/job_dsl.groovy

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,47 @@
11
folder('Whanos base images') {
2-
displayName('Whanos base images')
3-
description('Base images of whanos.')
2+
def List<String> languages = [
3+
'befunge',
4+
'c',
5+
'python',
6+
'java',
7+
'javascript'
8+
]
49

5-
def languages = [
6-
'befunge',
7-
'c',
8-
'python',
9-
'java',
10-
'javascript'
11-
]
10+
displayName(name)
11+
description('Base images of whanos.')
1212

13-
languages.each { lang ->
14-
freeStyleJob("Whanos base images/whanos-${lang}") {
15-
steps {
16-
shell("docker build -t whanos-foundation - < /images/Dockerfile.foundation")
17-
shell("docker build -t whanos-${lang} - < /images/${lang}/Dockerfile.base")
18-
}
13+
languages.each { lang ->
14+
freeStyleJob("${name}/whanos-${lang}") {
15+
steps {
16+
shell('docker build -t whanos-foundation - < /images/Dockerfile.foundation')
17+
shell("docker build -t whanos-${lang} - < /images/${lang}/Dockerfile.base")
18+
}
1919

20-
triggers {
21-
upstream('Build all base images')
22-
}
20+
triggers {
21+
upstream('Build all base images')
22+
}
23+
}
2324
}
24-
}
2525

26-
freeStyleJob("Whanos base images/Build all base images") {
27-
steps {
28-
shell('echo "Building all base images"')
29-
}
26+
freeStyleJob("${name}/Build all base images") {
27+
steps {
28+
shell('echo "Building all base images"')
29+
}
3030

31-
publishers {
32-
downstreamParameterized {
33-
trigger(languages.collect { "Whanos base images/whanos-${it}" }) {
34-
condition('ALWAYS')
35-
parameters {
36-
currentBuild()
37-
}
31+
publishers {
32+
downstreamParameterized {
33+
trigger(languages.collect { lang -> "${name}/whanos-${lang}" }) {
34+
condition('ALWAYS')
35+
parameters {
36+
currentBuild()
37+
}
38+
}
39+
}
3840
}
39-
}
4041
}
41-
}
4242
}
4343

4444
folder('Projects') {
45-
displayName('Projects')
46-
description('Available projets in whanos')
45+
displayName(name)
46+
description('Available projects in whanos')
4747
}

0 commit comments

Comments
 (0)