Draft: Introducing Build Position as a Condition - Seeking Guidance and Collaboration#93
Open
nurgul212 wants to merge 20 commits intojenkinsci:masterfrom
Open
Draft: Introducing Build Position as a Condition - Seeking Guidance and Collaboration#93nurgul212 wants to merge 20 commits intojenkinsci:masterfrom
nurgul212 wants to merge 20 commits intojenkinsci:masterfrom
Conversation
added 20 commits
September 12, 2023 14:38
…ditionDescriptor.java'
- The 'buildPosition' variable is used to track the position of each build as we iterate through completed builds
…java - Update method calls and logic to include 'buildPosition' in condition validation
… as -1 when it is not provided)
…ion sub-classes - I have added these overloaded matches method for buildPosition default value as -1, which was not a correct way, so I had to remove them.
…oded value for 'buildPosition'
…buildPosition = 0'
…nd applied minor corrections
Codecov Report
@@ Coverage Diff @@
## master #93 +/- ##
============================================
- Coverage 99.12% 96.66% -2.46%
- Complexity 123 125 +2
============================================
Files 27 29 +2
Lines 229 240 +11
Branches 18 18
============================================
+ Hits 227 232 +5
- Misses 1 7 +6
Partials 1 1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request introduces a draft version of the
Build Positionas a condition feature to the Build History manager plugin.This new functionality aims to provide users with greater control over build execution based on the position in the build history.
Changes
Added a new class: BuildPositionCondition.java
Modified existing classes to accommodate the new feature
BuildHistoryManager.javaclass, a counter was introduced to keep track of the build position.buildPositionparameter to thevalidateConditions()method in theRule.javaclass to pass the build position to conditions.Here is a screenshot of

Build Positionas displayed in the Jenkins UI:Testing
Conducted one integration test to ensure the new feature works as expected.
Related Issues
This pull request can address the issue #89.
Ongoing Development & Request for Guidance and Collaboration
This draft version is a starting point, I intend to continue developing and refining this feature based on the feedback. I kindly ask for your guidance and suggestions. Your knowledge and insights would be really helpful in making this new addition work well.
THANK YOU!!!
Submitter checklist