Defaulting to a StringParameterValue#18
Open
dannystaple wants to merge 3 commits intojenkinsci:masterfrom
Open
Defaulting to a StringParameterValue#18dannystaple wants to merge 3 commits intojenkinsci:masterfrom
dannystaple wants to merge 3 commits intojenkinsci:masterfrom
Conversation
If a parameter type from a plugin is not yet supported in the rebuild plugin, instead of raising an exception, default to use the StringParameterValue, which for most cases, will behave correctly.
Missing parameter types will now default to the StringParameterValue template.
My last commit was ALWAYS defaulting to StringParameterValue. This will fallback properly. The problem was that the file exists was dependant on the PWD - not the classpath. Handling this exception here works instead.
|
plugins » rebuild-plugin #22 SUCCESS |
Member
There was a problem hiding this comment.
I'm not sure that this check is OK, because it relies on non-documented text, etc. I suppose it should be implemented in the Java code. I suppose that it can be implemented using small patch in #17
Author
There was a problem hiding this comment.
That makes sense - changing the Jelly seemed like a least intrusive patch, but "No page found" is merely human readable text and my code here is treating it as protocol.
Member
|
Mistakenly pressed Merge pull request :( but the actual merge is not happened somebody please confirm how to reopen, or we cant reopen. |
Member
|
This is still open, but needs a rebase in order to be mergeable via the button. |
370af40 to
316c049
Compare
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.
Currently the rebuild plugin will throw an exception if it encounters a parameter type it doesn't know about - which could be introduced by many other plugins or custom HPI's.
This can be worked around by copying the StringParameterValue.jelly to one with the name of the new parameter type and restarting Jenkins - somewhat inconvenient, especially where restarting is an option that may need to be scheduled on a busy CI/Test farm.
These changes will cause the RebuildPlugin to use the custom jelly for a ParameterValue type if it exists in the folder, but if there is none, it will fall back to the StringParameterValue rendering, which for all but a few unusual cases, should be good enough. This saves rebuild plugin having to peg new plugins, and saves having to work around and restart for busy installations.
Tested on the current Jenkins LTS version.