|
1 | 1 | 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 | + ] |
4 | 9 |
|
5 | | - def languages = [ |
6 | | - 'befunge', |
7 | | - 'c', |
8 | | - 'python', |
9 | | - 'java', |
10 | | - 'javascript' |
11 | | - ] |
| 10 | + displayName(name) |
| 11 | + description('Base images of whanos.') |
12 | 12 |
|
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 | + } |
19 | 19 |
|
20 | | - triggers { |
21 | | - upstream('Build all base images') |
22 | | - } |
| 20 | + triggers { |
| 21 | + upstream('Build all base images') |
| 22 | + } |
| 23 | + } |
23 | 24 | } |
24 | | - } |
25 | 25 |
|
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 | + } |
30 | 30 |
|
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 | + } |
38 | 40 | } |
39 | | - } |
40 | 41 | } |
41 | | - } |
42 | 42 | } |
43 | 43 |
|
44 | 44 | folder('Projects') { |
45 | | - displayName('Projects') |
46 | | - description('Available projets in whanos') |
| 45 | + displayName(name) |
| 46 | + description('Available projects in whanos') |
47 | 47 | } |
0 commit comments