jenkinsci / jenkinsci/conditional-buildstep-plugin
[JENKINS-20292] Option to specify an else-block
- Dominant language
- Java
- Stars
- 17
- Forks
- 39
- Avg merge
- 23h 17m
- Merged PRs (30d)
- 1
Description
When using the conditional buildstep plugin to build an if-else structure, you have to configure the same condition two times.
Example: execute step x if strings match, execute step y else
You will have to wrap step x into a strings-match-condition and wrap step y into a not(string-match)-condition.
It would be much nicer to be able to add an else-block to do something like this:
Run if strings match: string1, string2
--> step x
else
--> step y
---
Originally reported by wolterhis, imported from: Option to specify an else-block
domi
Raw content of original issue
When using the conditional buildstep plugin to build an if-else structure, you have to configure the same condition two times.
Example: execute step x if strings match, execute step y else
You will have to wrap step x into a strings-match-condition and wrap step y into a not(string-match)-condition.
It would be much nicer to be able to add an else-block to do something like this:
Run if strings match: string1, string2
--> step x
else
--> step y
Contributor guide
Research direction
The issue names the conditional-buildstep-plugin but no files or tests. Start by locating the plugin's conditional build-step configuration and execution entry points, then inspect related tests if present. Done means users can configure separate true and else steps without duplicating the condition, with both branches covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devops
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100