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

Option failFast in declarative pipeline does not support variables

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      In a declarative pipeline, we have some parallel steps. On start of a build, the user should be able to decide whether the steps should fail fast or not.

      Thus, we introduced a boolean parameter "FAIL_FAST" and used it in the step like this:

      stage('Smoke Test') {
          failFast params.FAIL_FAST
          parallel {
              ...

      However, that led to following exception:

      org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
      WorkflowScript: 196: Expected a boolean with failFast @ line 196, column 7.
           failFast params.FAIL_FAST
           ^

      It should be possible to use variables at this point.

        Attachments

          Activity

          chamshoff Christoph Amshoff created issue -
          chamshoff Christoph Amshoff made changes -
          Field Original Value New Value
          Description In a declarative pipeline, we have some parallel steps. On start of a build, the user should be able to decide whether the steps should fail fast or not.

          Thus, we introduced a boolean parameter "FAIL_FAST" and used it in the step like this:

          {{stage('Smoke Test') {}}
          {{    failFast params.FAIL_FAST}}
          {{    parallel {}}
          {{        ...}}
          {{    }}}

          However, that led to following exception:

          {{org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:}}
          {{WorkflowScript: 196: Expected a boolean with failFast @ line 196, column 7.}}
          {{     failFast params.FAIL_FAST}}
          {{     ^}}

          It should be possible to use variables at this point.
          In a declarative pipeline, we have some parallel steps. On start of a build, the user should be able to decide whether the steps should fail fast or not.

          Thus, we introduced a boolean parameter "FAIL_FAST" and used it in the step like this:

          {{stage('Smoke Test') {}}
           {{    failFast params.FAIL_FAST}}
           {{    parallel {}}
           {{        ...}}

          However, that led to following exception:

          {{org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:}}
           {{WorkflowScript: 196: Expected a boolean with failFast @ line 196, column 7.}}
           {{     failFast params.FAIL_FAST}}
           {{     ^}}

          It should be possible to use variables at this point.

            People

            • Assignee:
              Unassigned
              Reporter:
              chamshoff Christoph Amshoff
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: