Hello,

I have a pipeline like below. And skip stage(when Closure) works fine. 

*pipeline {*
*    agent any*
*    stages {*
*        stage('Build') {*
*                 when { expression { false } }*
*            parallel {*
*                stage('Backend') {*
*                    steps {*
*                        buildbackend*
*                    }*
*                }*
*                stage('Frontend') {*
*                    steps {*
*                        buildfrontend*
*                    }*
*                }*
*            }*
*        }*
*    }*
*}*


<https://lh3.googleusercontent.com/-mCWTZt_eIFo/Wcu4LscVr3I/AAAAAAAAo3c/N92q5-OqPRoc_07haNo4RCNGjNnjypEcwCLcBGAs/s1600/Capture.PNG>







However, when I move the *when *Closure to one of the 2 nested stages. It 
doesn't work. I really appreciate if there is any help in this regard.



*pipeline {  agent any  stages {      stage('Build') {          parallel {  
            stage('Backend') {                                 when { 
expression { false } }                                   steps {            
          buildbackend                  }              }              
stage('Frontend') {           when { expression { false } }                 
  steps {                      buildfrontend                  }            
  }          }      }  }}*
*My log indicates that the stages are skipped.*





















*[Pipeline] stage[Pipeline] { (Build)[Pipeline] parallel[Pipeline] 
[Backend] { (Branch: Backend)[Pipeline] [Frontend] { (Branch: 
Frontend)[Pipeline] [Backend] stage[Pipeline] [Backend] { 
(Backend)[Pipeline] [Frontend] stage[Pipeline] [Frontend] { (Frontend)Stage 
'Backend' skipped due to when conditionalStage 'Frontend' skipped due to 
when conditional[Pipeline] [Backend] }[Pipeline] [Frontend] }[Pipeline] 
[Backend] // stage[Pipeline] [Frontend] // stage[Pipeline] [Backend] 
}[Pipeline] [Frontend] }[Pipeline] // parallel[Pipeline] }[Pipeline] // 
stageBut BlueOcean doesn't display it.*


<https://lh3.googleusercontent.com/-RiA9Tqb28yM/Wcu5Tv0r6nI/AAAAAAAAo3k/KPFtH1kSP5EsflWoKUcHM3wMbxdgcxsOQCLcBGAs/s1600/Capture.PNG>
<https://lh3.googleusercontent.com/-RiA9Tqb28yM/Wcu5Tv0r6nI/AAAAAAAAo3k/KPFtH1kSP5EsflWoKUcHM3wMbxdgcxsOQCLcBGAs/s1600/Capture.PNG>Kind
 
Regards 
<https://lh3.googleusercontent.com/-RiA9Tqb28yM/Wcu5Tv0r6nI/AAAAAAAAo3k/KPFtH1kSP5EsflWoKUcHM3wMbxdgcxsOQCLcBGAs/s1600/Capture.PNG>
Ram 
<https://lh3.googleusercontent.com/-RiA9Tqb28yM/Wcu5Tv0r6nI/AAAAAAAAo3k/KPFtH1kSP5EsflWoKUcHM3wMbxdgcxsOQCLcBGAs/s1600/Capture.PNG>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/23b90adf-a470-4bae-9883-e8eff3541a88%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to