Using environment in when block leads to unknown conditional error

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      After updating to the latest version of the Pipeline Model Definition Plugin I get the following error:

       

      WorkflowScript: 43: Unknown conditional error. Valid conditionals are: allOf, anyOf, branch, changelog, changeset, environment, expression, not @ line 43, column 21.
       environment name: 'CONTINUE', value: 'yes'
       ^

      The whole block looks like this

      stage('stage') {
        when {
          environment name: 'CONTINUE', value: 'yes'
        }
        steps {
          do something
        }
      }
      

            Assignee:
            Andrew Bayer
            Reporter:
            Waldemar Wukowa
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: