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' }

      }

          [JENKINS-41985] Pipeline documentation for the "when" closure is missing the "expression" closure

          Andrew Bayer added a comment -

          PR up to fix the syntax examples in the doc - https://github.com/jenkins-infra/jenkins.io/pull/648

          Andrew Bayer added a comment - PR up to fix the syntax examples in the doc - https://github.com/jenkins-infra/jenkins.io/pull/648

          Code changed in jenkins
          User: Andrew Bayer
          Path:
          content/doc/book/pipeline/syntax.adoc
          http://jenkins-ci.org/commit/jenkins.io/7c9d265a78e6e19b7ab34e1bdbe5a31a015fe1f2
          Log:
          [FIXED JENKINS-41985] Fix when expression syntax

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: content/doc/book/pipeline/syntax.adoc http://jenkins-ci.org/commit/jenkins.io/7c9d265a78e6e19b7ab34e1bdbe5a31a015fe1f2 Log: [FIXED JENKINS-41985] Fix when expression syntax

          Liam Newman added a comment -

          Bulk closing resolved issues.

          Liam Newman added a comment - Bulk closing resolved issues.

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

              Created:
              Updated:
              Resolved: