jenkinsci / jenkinsci/conditional-buildstep-plugin

[JENKINS-20292] Option to specify an else-block

Open
#172 9 comments 0 reactions 0 assignees View on GitHub
component:conditional-buildstep-plugin imported-jira-issue priority:minor resolution:unresolved
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


  • assignee: domi
  • status: Open
  • priority: Minor
  • component(s): conditional-buildstep-plugin
  • resolution: Unresolved
  • votes: 20
  • watchers: 20
  • imported: 20260107-133739

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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.