[JIRA] (JENKINS-61101) Mutually exclusive stages in declarative pipeline

2020-03-04 Thread bitwise...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Liam Newman commented on  JENKINS-61101  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Mutually exclusive stages in declarative pipeline   
 

  
 
 
 
 

 
 I love this syntax. Very elegant.  I'm not sure exactly how it should be implemented yet. I agree it would be nice to have blue ocean display these vertically, but that would mean implementing/exposing the switch as though it were a parallel with would limit where it could be used - for instance then we couldn't have a switch inside a switch.   
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.204612.1581715429000.5278.1583342940632%40Atlassian.JIRA.


[JIRA] (JENKINS-61101) Mutually exclusive stages in declarative pipeline

2020-03-04 Thread bitwise...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Liam Newman assigned an issue to Liam Newman  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-61101  
 
 
  Mutually exclusive stages in declarative pipeline   
 

  
 
 
 
 

 
Change By: 
 Liam Newman  
 
 
Assignee: 
 Andrew Bayer Liam Newman  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.204612.1581715429000.5248.1583342640167%40Atlassian.JIRA.


[JIRA] (JENKINS-61101) Mutually exclusive stages in declarative pipeline

2020-02-15 Thread jenk...@gavinmogan.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Gavin Mogan updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-61101  
 
 
  Mutually exclusive stages in declarative pipeline   
 

  
 
 
 
 

 
Change By: 
 Gavin Mogan  
 
 
Component/s: 
 blueocean-plugin  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.204612.1581715429000.283.1581792000283%40Atlassian.JIRA.


[JIRA] (JENKINS-61101) Mutually exclusive stages in declarative pipeline

2020-02-14 Thread rittn...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Jesse Rittner created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-61101  
 
 
  Mutually exclusive stages in declarative pipeline   
 

  
 
 
 
 

 
Issue Type: 
  New Feature  
 
 
Assignee: 
 Andrew Bayer  
 
 
Components: 
 blueocean-plugin, pipeline-model-definition-plugin  
 
 
Created: 
 2020-02-14 21:23  
 
 
Priority: 
  Minor  
 
 
Reporter: 
 Jesse Rittner  
 

  
 
 
 
 

 
 There have been a few cases where I've needed to define a set of mutually exclusive stages of which only one should execute. Right now this can be accomplished with a parallel block containing stages with inter-related when conditions, but this is annoying to manage. I propose adding a new switch block to stage.   

 

stage ("Do It") {
switch {
stage("Stage A") {
when { _expression_ { return conditionA } }
steps { ... }
}
stage("Stage B") {
 when { _expression_ { return conditionB } }
 steps { ... }
}
stage("Stage C") {
steps { ... }
}
}
}
 

 This means "If condition A, do Stage A. Else if condition B, do Stage B. Else, do Stage C." switch would be at the same level as stages, parallel, and matrix today. This allows Blue Ocean to clearly display the mutually exclusive stages (probably in a vertical arrangement, like it does for parallel).