[JIRA] (JENKINS-41187) Stage "when" should have "stage" condition

7 views
Skip to first unread message

bnacey@gmail.com (JIRA)

unread,
Oct 15, 2019, 12:39:03 PM10/15/19
to jenkinsc...@googlegroups.com
Brian Nacey commented on Improvement JENKINS-41187
 
Re: Stage "when" should have "stage" condition

Has there need any progress on this? I find myself in need of a solution to know if an earlier stage has been built.

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

bnacey@gmail.com (JIRA)

unread,
Oct 15, 2019, 12:39:05 PM10/15/19
to jenkinsc...@googlegroups.com
Brian Nacey edited a comment on Improvement JENKINS-41187
Has there need been any progress on this? I find myself in need of a solution to know if an earlier stage has been built.

rittneje@gmail.com (JIRA)

unread,
Feb 13, 2020, 6:15:03 PM2/13/20
to jenkinsc...@googlegroups.com

I found myself needing something similar - a set of mutually exclusive stages of which only one should execute. I would actually prefer something like this:

 

 

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).

 

 

bitwiseman@gmail.com (JIRA)

unread,
Feb 14, 2020, 11:31:03 AM2/14/20
to jenkinsc...@googlegroups.com

Jesse Rittner
Wow. Yeah, I like that idea. It is a separate idea from this, though I see the relation. Please file an issue for it.

Brian Nacey
No there hasn't been more progress on this issue. It stalled out. Restarting it would require some effort.

Reply all
Reply to author
Forward
0 new messages