回答編集履歴
2
サンプル小修正
test
CHANGED
@@ -14,21 +14,21 @@
|
|
14
14
|
|
15
15
|
```jenkinsfile
|
16
16
|
|
17
|
-
|
17
|
+
def projects = ["Entity.20", "Extensions.35", "Forms.40"]
|
18
18
|
|
19
19
|
def configs = [:]
|
20
20
|
|
21
|
-
for (
|
21
|
+
for (proj in projects)
|
22
22
|
|
23
23
|
{
|
24
24
|
|
25
|
-
def c =
|
25
|
+
def copyproj = proj // ここ重要
|
26
26
|
|
27
|
-
configs[c] = {
|
27
|
+
configs[copyproj] = {
|
28
28
|
|
29
29
|
//実行内容記述
|
30
30
|
|
31
|
-
echo c
|
31
|
+
echo copyproj
|
32
32
|
|
33
33
|
}
|
34
34
|
|
1
サンプル追加しました
test
CHANGED
@@ -9,3 +9,55 @@
|
|
9
9
|
参考URL
|
10
10
|
|
11
11
|
[https://qiita.com/kumagi/items/70f3c8498a0777078cca](https://qiita.com/kumagi/items/70f3c8498a0777078cca)
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
```jenkinsfile
|
16
|
+
|
17
|
+
//pipeline{}の外に記述
|
18
|
+
|
19
|
+
def configs = [:]
|
20
|
+
|
21
|
+
for (conf in ["Entity.20", "Extensions.35", "Forms.40"])
|
22
|
+
|
23
|
+
{
|
24
|
+
|
25
|
+
def c = conf // これで解決
|
26
|
+
|
27
|
+
configs[c] = {
|
28
|
+
|
29
|
+
//実行内容記述
|
30
|
+
|
31
|
+
echo c
|
32
|
+
|
33
|
+
}
|
34
|
+
|
35
|
+
}
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
pipeline {
|
40
|
+
|
41
|
+
agent any
|
42
|
+
|
43
|
+
stages {
|
44
|
+
|
45
|
+
stage('Test') {
|
46
|
+
|
47
|
+
steps {
|
48
|
+
|
49
|
+
script {
|
50
|
+
|
51
|
+
parallel configs
|
52
|
+
|
53
|
+
}
|
54
|
+
|
55
|
+
}
|
56
|
+
|
57
|
+
}
|
58
|
+
|
59
|
+
}
|
60
|
+
|
61
|
+
}
|
62
|
+
|
63
|
+
```
|