回答編集履歴
2
サンプル小修正
answer
CHANGED
@@ -6,14 +6,14 @@
|
|
6
6
|
[https://qiita.com/kumagi/items/70f3c8498a0777078cca](https://qiita.com/kumagi/items/70f3c8498a0777078cca)
|
7
7
|
|
8
8
|
```jenkinsfile
|
9
|
-
|
9
|
+
def projects = ["Entity.20", "Extensions.35", "Forms.40"]
|
10
10
|
def configs = [:]
|
11
|
-
for (
|
11
|
+
for (proj in projects)
|
12
12
|
{
|
13
|
-
def
|
13
|
+
def copyproj = proj // ここ重要
|
14
|
-
configs[
|
14
|
+
configs[copyproj] = {
|
15
15
|
//実行内容記述
|
16
|
-
echo
|
16
|
+
echo copyproj
|
17
17
|
}
|
18
18
|
}
|
19
19
|
|
1
サンプル追加しました
answer
CHANGED
@@ -3,4 +3,30 @@
|
|
3
3
|
ですので、プロジェクト名の一覧を定義し、そこからmapを作成すると良いのではないでしょうか。
|
4
4
|
|
5
5
|
参考URL
|
6
|
-
[https://qiita.com/kumagi/items/70f3c8498a0777078cca](https://qiita.com/kumagi/items/70f3c8498a0777078cca)
|
6
|
+
[https://qiita.com/kumagi/items/70f3c8498a0777078cca](https://qiita.com/kumagi/items/70f3c8498a0777078cca)
|
7
|
+
|
8
|
+
```jenkinsfile
|
9
|
+
//pipeline{}の外に記述
|
10
|
+
def configs = [:]
|
11
|
+
for (conf in ["Entity.20", "Extensions.35", "Forms.40"])
|
12
|
+
{
|
13
|
+
def c = conf // これで解決
|
14
|
+
configs[c] = {
|
15
|
+
//実行内容記述
|
16
|
+
echo c
|
17
|
+
}
|
18
|
+
}
|
19
|
+
|
20
|
+
pipeline {
|
21
|
+
agent any
|
22
|
+
stages {
|
23
|
+
stage('Test') {
|
24
|
+
steps {
|
25
|
+
script {
|
26
|
+
parallel configs
|
27
|
+
}
|
28
|
+
}
|
29
|
+
}
|
30
|
+
}
|
31
|
+
}
|
32
|
+
```
|