Details
-
Type:
Improvement
-
Status: Resolved (View Workflow)
-
Priority:
Major
-
Resolution: Not A Defect
-
Component/s: pipeline-build-step-plugin
-
Labels:
-
Environment:RedHat7.3 JenkinsLTS 2.60.3
Java 1.8.144
-
Similar Issues:
-
Epic Link:
Description
Following is pipeline code
@NonCPS
def fn(){
def parallelArgs = [:]
new File('/home/jenkins/workspace/test_post_for_pipeline').eachFile() {
file ->
if (file.getName().endsWith('.properties')) {
parallelArgs["Run: $\{file.getName()}"] = {
build job: 'test', wait: true, parameters: [string(name: 'IN_PARAM_1', value: file.getAbsolutePath()), string(name: 'IN_PARAM_2', value: '2'), string(name: 'IN_PARAM_3', value: '3')]
}
}
}
parallel(parallelArgs)
}
node('master'){
fn()
}
Result: the build will hang forever. even downstream job test build done
Started by user
Shuaibing Li
Replayed
[#121
https://jenkins-c.lombardrisk.com/job/test_post_for_pipeline/121/] [Pipeline] node Running on Jenkins in /home/jenkins/workspace/test_post_for_pipeline [Pipeline] { [Pipeline] parallel [Pipeline] [Run: a.properties] { (Branch: Run: a.properties) [Pipeline] [Run: a.properties] build (Building test) [Run: a.properties] Scheduling project: [test |
https://jenkins-c.lombardrisk.com/job/test/] [Pipeline] [Run: b.properties] { (Branch: Run: b.properties) [Pipeline] [Run: a.properties] build (Building test) [Run: a.properties] Scheduling project: [test |
https://jenkins-c.lombardrisk.com/job/test/] [Run: a.properties] Starting building: test #313 ![]() |
After I abort this build, I got following log:
Started by user
Shuaibing Li
Replayed
#121
[Pipeline] node
Running on
Jenkins
in /home/jenkins/workspace/test_post_for_pipeline
[Pipeline] {
[Pipeline] parallel
[Pipeline] [Run: a.properties] { (Branch: Run: a.properties)
[Pipeline] [Run: a.properties] build (Building test)
[Run: a.properties] Scheduling project:
test
[Pipeline] [Run: b.properties] { (Branch: Run: b.properties)
[Pipeline] [Run: a.properties] build (Building test)
[Run: a.properties] Scheduling project:
test
[Run: a.properties] Starting building:
test #313
Aborted by
Shuaibing Li
[Pipeline] [Run: a.properties] }
[Run: a.properties] Failed in branch Run: a.properties
[Pipeline] [Run: b.properties] }
[Run: b.properties] Failed in branch Run: b.properties
[Pipeline] // parallel
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
[BFA] Scanning build for known causes...
[BFA] No failure causes found
[BFA] Done. 0s
Finished: ABORTED