jenkinsci / jenkinsci/workflow-aggregator-plugin
[JENKINS-56413] Option failFast in declarative pipeline does not support variables
- Dominant language
- No language data
- Stars
- 225
- Forks
- 125
- PR merge metrics
- No merged PRs in 30d
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.
---
Originally reported by
chamshoff, imported from: Option failFast in declarative pipeline does not support variables
Raw content of original issue
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.
Contributor guide
Research direction
The issue names no repository files or tests. Start by reproducing the declarative pipeline example with a boolean parameter and the failFast validation error; done means a variable such as params.FAIL_FAST is accepted and controls whether parallel steps fail fast.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy
- Domain
- ci-cd
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100