Details

    • Similar Issues:

      Description

      When using the conditional buildstep plugin to build an if-else structure, you have to configure the same condition two times.

      Example: execute step x if strings match, execute step y else

      You will have to wrap step x into a strings-match-condition and wrap step y into a not(string-match)-condition.

      It would be much nicer to be able to add an else-block to do something like this:
      Run if strings match: string1, string2
      --> step x
      else
      --> step y

        Attachments

          Issue Links

            Activity

            Hide
            inger Gergely Nagy added a comment - - edited

            I absolutely agreed, some of my conditions are so much messier due to the repetition - that I've fallen back to edit the config.xml via API.
            (BTW, if there was a way to copy/paste buildsteps between outside and insider the condition (and in general in Jenkins, it would make this less painful.)

            I'm considering working on this - unless experts owners disagree or think it's really tricky to do.

            Show
            inger Gergely Nagy added a comment - - edited I absolutely agreed, some of my conditions are so much messier due to the repetition - that I've fallen back to edit the config.xml via API. (BTW, if there was a way to copy/paste buildsteps between outside and insider the condition (and in general in Jenkins , it would make this less painful.) I'm considering working on this - unless experts owners disagree or think it's really tricky to do.
            Hide
            domi Dominik Bartholdi added a comment -

            I think the "else case" would absolutly make sense - feel free to send a PR

            Show
            domi Dominik Bartholdi added a comment - I think the "else case" would absolutly make sense - feel free to send a PR
            Hide
            mohdnisart nisar T added a comment -

            Is this change available ??

            Show
            mohdnisart nisar T added a comment - Is this change available ??
            Hide
            sqoorch Michał Stasiak added a comment -

            I'd like to vote for this feature.
            It would be nice to have bash-like "if" options - not only 'if-else', but
            if
            --> step x
            else if
            --> step y
            else if
            --> step z
            [..]
            else
            --> final step

            Show
            sqoorch Michał Stasiak added a comment - I'd like to vote for this feature. It would be nice to have bash-like "if" options - not only 'if-else', but if --> step x else if --> step y else if --> step z [..] else --> final step
            Hide
            zerthimon Lior Goikhburg added a comment -

            +1

            Show
            zerthimon Lior Goikhburg added a comment - +1
            Hide
            ohadr ohad r added a comment -

            +1

            Show
            ohadr ohad r added a comment - +1
            Hide
            liyatikal liyatikal added a comment -

            Any chance this feature will be implemented soon?

            Show
            liyatikal liyatikal added a comment - Any chance this feature will be implemented soon?
            Hide
            azazael Sanjay Thomas added a comment -

             I had opened a pull request to implement this feature. Could you take a look?

            Show
            azazael Sanjay Thomas added a comment -  I had opened a pull request to implement this feature. Could you take a look?

              People

              • Assignee:
                domi Dominik Bartholdi
                Reporter:
                wolterhis Lars
              • Votes:
                20 Vote for this issue
                Watchers:
                20 Start watching this issue

                Dates

                • Created:
                  Updated: