I like to add stackoverflow questions also, in the below two questions in 
one they are saying it doable in Declarative and another saying you need to 
wrap it with script {} block.

which one i we need to follow.

https://stackoverflow.com/questions/44585619/parallel-jenkins-pipeline

https://stackoverflow.com/questions/45294813/jenkins-declarative-pipeline-parallel-stages

Thanks,
JB

On Thursday, August 24, 2017 at 6:53:07 AM UTC+5:30, jothibasu k wrote:
>
> I understand the basic difference between the Declarative and scripted 
> pipeline in Jenkins 2.0.
>
> when I try to implement the parallel deployment on different nodes, it 
> seems declarative is not working I guess.
>
> Question
> ========
> 1. can you please confirm running the parallel task in the different node 
> is supported or not in both pipeline model.
> 2. if it works the syntax to do that in the declarative and scripted 
> pipeline.
>
> My declarative pipeline 
>
> *pipeline {*
> *agent any*
> *stages {*
> *stage('build') {*
> *  agent { label 'testnode' }*
> *  echo 'build process'*
> *}*
> *stage('Deployment') {*
> *steps {*
> *parallel (*
> *"Deployment1": {*
> *agent { label 'server01'}*
> *echo 'deployment in server1'*
> *},*
>
> *"Deployment2": {*
> *agent { label 'server02 }*
> *echo 'deployment in server2'*
> *}*
> *)*
> *}*
> *}*
> *}*
> *}*
>
>
> the above example is not working, if i put the agent in stage level it is 
> working but stream level it is not working, basically, i like to understand 
> parallel execution in the different node is supported or not on both 
> pipelines.
>
> Thanks in Advance,
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/eaf7b3a6-06c3-439d-bd0c-9df0aaebcf06%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to