The following fails in pipeline scripts (the if statement always evaluates to false)

      def getStatus(){
       // ....
       "Ready"
      }
      
      //....
      
      
      def acceptedStatuses = ["Ready", "Updated", "Failed" ]
      def status
      if(acceptedStatuses.contains((status = getStatus()))){
         // never called
      }
      
      
      

          [JENKINS-41422] Assignment in if statements does not work

          There are no comments yet on this issue.

            Unassigned Unassigned
            zhelyan Zhelyan Panchev
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: