Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-43389

switch statement default case not called if other match found in Pipeline DSL

XMLWordPrintable

      The simplest of scripts to reproduce the issue:

      switch ("triggervalue") {
          case "triggervalue":
              echo "triggervalue match"
          default:
              echo "Sorry, this does not print..."
      }
      

      When no other case is triggered, then the default does seem to work.

       

            Unassigned Unassigned
            bwijsmuller bwijsmuller
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: