Jenkins plugin for parallel tasks

Jenkins pipeline plugin how to perform parallel tasks

I am new to jenkins, I want to run multiple tasks in parallel on available jenkins subordinates using the pipeline plugin.

I installed the pipeline plugin and added it below in the pipeline script section.

grovvy script : parallel firstBranch: { node('master'){ echo 'firstBranch' } }, secondBranch: { node('slave1'){ echo 'secondBranch' } } 

NOTE: master and slave1 are my nodes

What is firstBranch and secondBranch perfect ????

console output:

Anonymous user [Pipeline] parallel [Pipeline] [firstBranch] {(Branch: firstBranch) [Pipeline] [secondBranch] {(Branch: secondBranch) [Pipeline] [firstBranch] node [firstBranch] Start on master in / scratch / gnithyan /. hudson / workspace / pipeline_test
[Pipeline] [secondBranch] node
[Pipeline] [secondBranch] // node
[Pipeline] [secondBranch]}
[secondBranch] Could not connect to secondBranch branch
[Pipeline] [firstBranch] {
[Pipeline] [firstBranch] echo
[firstBranch] firstBranch
[Pipeline] [firstBranch]}
[Pipeline] [firstBranch] // node
[Pipeline] [firstBranch]}
[Pipeline] // parallel
[Pipeline] End of the pipeline

java.lang.IllegalStateException: Unable to start logging to ready nodeorg.jenkinsci.plugins.workflow.cps.nodes.StepStartNode [id = 8] at org.jenkinsci.plugins.workflow.support.actions.LogActionImpl. (LogActionImpl.java:110) in org.jenkinsci.plugins.workflow.support.actions.LogActionImpl.stream (LogActionImpl.java:81) in org.jenkinsci.plugins.workflow.support.DefaultStepContext.get (DefaultStepContext.java:73 ) in org.jenkinsci.plugins.workflow.steps.StepDescriptor.checkContextAvailability (StepDescriptor.java:252) on org.jenkinsci.plugins.workflow.cps.DSL.invokeStep (DSL.java:179) in org.jenkinsci.plug. workflow.cps.DSL.invokeMethod (DSL.java:126) in org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod (CpsScript.java:108) in groovy.lang.GroovyObject $ invokeMethod $ 0.call (Unknown source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall (CallSiteArray.java:48)

+5
source share
3 answers

I have the same problem. Perhaps I found a dependent plugin: https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Supporting+APIs+Plugin See Release Note for version 2.10 Regression in log processing with certain steps inside the parallel in 2.9.

Yes, updating the plugin works!

+5
source

This seems to be a bug in the api pipeline version 2.9 and will be fixed using 2.10 (see also the release notes https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Supporting+APIs+Plugin )

+1
source

For me, this looks completely correct. I had a delivery defined as a conveyor and it worked fine. Today, after upgrading Jenkins from 2.25 to 2.26, I got the same error. However, downgrading to 2.25 did not help, possibly because I updated the plugins :(

0
source

Source: https://habr.com/ru/post/1258524/


All Articles