-
-
Notifications
You must be signed in to change notification settings - Fork 9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make all CLI commands compatible with Pipeline where possible #2874
Merged
Merged
Changes from all commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
5046c56
[FIX JENKINS-30785] Generalize some CLI stuff to AbstractItem
daniel-beck 2e27be7
Offering default methods on ParameterizedJob.
jglick fbadce3
Javadoc typo.
jglick 626b876
Cleaner use of default methods in ParameterizedJob.
jglick 3139f23
Need to pick up https://github.com/infradna/bridge-method-injector/pu…
jglick d71db0f
Sketch of pulling disabled functionality into ParameterizedJob.
jglick 9318eef
EnableJobCommandTest.groovy → EnableJobCommandTest.java, and replacin…
jglick b7e1d86
All CLI commands could be broken by a missing CLI.*.shortDescription …
jglick 41630e2
Forgot to move CLI method short descriptions to new package.
jglick 1fffbed
Needed a @CLIResolver for ParameterizedJob. Adding an OptionHandler w…
jglick cd95d2b
Trying to fix up access-modifier versions; started failing in CI toda…
jglick 137b8ec
Introduced <p:makeDisabled/> by analogy with <p:config-disableBuild/>.
jglick 36a5301
Using new type bounds.
jglick 1c759d3
Merge branch 'ParameterizedJobMixIn-defaults' into AbstractProject.di…
jglick 59fb6e6
access-modifier 1.11 released.
jglick aeb9952
MatrixProject and MavenModuleSet both expect to have access to makeDi…
jglick bb617a6
Trying to generalize some more.
jglick 1517179
Minor simplification.
jglick 265ae0a
[JENKINS-34716] Generalizing doPolling and schedulePolling.
jglick b6459e1
isBuildable
jglick 30c6674
Obsolete comment.
jglick 244e419
Updated comments.
jglick 82ad44a
bridge-method-injector 1.17
jglick d24bb16
Unfortunately AbstractProject.schedulePolling cannot delegate to SCMT…
jglick 7be31a1
Merge branch 'jenkins-24141' of https://github.com/abayer/jenkins int…
jglick ab290b6
Making delete-builds and list-changes commands work with Pipeline.
jglick d36a1c9
[FIXED JENKINS-41527] Made console CLI command compatible with Pipeline.
jglick 2703411
Merge branch 'JENKINS-30785' of https://github.com/daniel-beck/jenkin…
jglick bb6dd69
Fixed set-build-description and set-build-display-name.
jglick 8a75156
Merge branch 'master' into CLI-JENKINS-41527
jglick d5e83dd
@oleg-nenashev agreed it would be clearer to explicitly mark commands…
jglick 220e152
Updated tests to match slight message changes.
jglick faaee4c
bridge-method-injector 1.17
jglick 8f49071
Merge branch 'master' into ParameterizedJobMixIn-defaults
jglick 0a00506
Merge branch 'ParameterizedJobMixIn-defaults' into AbstractProject.di…
jglick 6a38c31
Merge branch 'master' into CLI-JENKINS-41527
jglick f0b79a0
Merge branch 'master' into AbstractProject.disabled-JENKINS-27299
jglick eed093e
Merge branch 'AbstractProject.disabled-JENKINS-27299' into CLI-JENKIN…
jglick 59223d1
@olivergondza pointed out that RunRangeCommand is a better name than …
jglick ec4e66e
Merge branch 'master' into CLI-JENKINS-41527
oleg-nenashev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package hudson.cli; | ||
|
||
import hudson.model.Fingerprint.RangeSet; | ||
import hudson.model.Job; | ||
import hudson.model.Run; | ||
import org.kohsuke.args4j.Argument; | ||
|
||
import java.io.IOException; | ||
import java.util.List; | ||
|
||
/** | ||
* {@link CLICommand} that acts on a series of {@link Run}s. | ||
* @since FIXME | ||
*/ | ||
public abstract class RunRangeCommand extends CLICommand { | ||
@Argument(metaVar="JOB",usage="Name of the job to build",required=true,index=0) | ||
public Job<?,?> job; | ||
|
||
@Argument(metaVar="RANGE",usage="Range of the build records to delete. 'N-M', 'N,M', or 'N'",required=true,index=1) | ||
public String range; | ||
|
||
protected int run() throws Exception { | ||
RangeSet rs = RangeSet.fromString(range,false); | ||
|
||
return act((List)job.getBuilds(rs)); | ||
} | ||
|
||
protected abstract int act(List<Run<?,?>> builds) throws IOException; | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just item? Or maybe even TopLevelItem (who would reload other items anyway?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reload
is defined inAbstractItem
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed.