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

Pipeline documentation for the "when" closure is missing the "expression" closure

      In the documentation there is a missing "expression" closure nested in the "when" closure.

      https://jenkins.io/doc/book/pipeline/syntax/

      Under "Built in Conditions"

      expression

      Execute the stage when the specified Groovy expression evaluates to true, for example: when

      { return params.DEBUG_BUILD }

      In the following link it is presented correctly:

      https://jenkins.io/blog/2017/01/19/converting-conditional-to-pipeline/

      when {
      // Only say hello if a "greeting" is requested
      expression

      { params.REQUESTED_ACTION == 'greeting' }

      }

            abayer Andrew Bayer
            mydoal Roi Aldaag
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: