-
Notifications
You must be signed in to change notification settings - Fork 98
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
Defaulting to a StringParameterValue #18
base: master
Are you sure you want to change the base?
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 |
<st:include it="${parameterValue}" | ||
from="${it}" page="${valuePage}.jelly"/> | ||
</j:catch> | ||
<j:if test="${ex != null and ex.toString().contains('No page found')}"> |
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.
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
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.
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.
Mistakenly pressed Merge pull request :( but the actual merge is not happened somebody please confirm how to reopen, or we cant reopen. |
This is still open, but needs a rebase in order to be mergeable via the button. |
370af40
to
316c049
Compare
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.