Sometimes Jenkins does go crazy. Luckily, there is a nice tool to understand what's happening - Script Console.
It's available on https://${jenkins}/script and allows you to execute Groovy scripts on running Jenkins. Here is an example of script that I used to debug issue with one plugin, just to give a sense of how far you can go:
It's available on https://${jenkins}/script and allows you to execute Groovy scripts on running Jenkins. Here is an example of script that I used to debug issue with one plugin, just to give a sense of how far you can go:
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
println(Jenkins.XSTREAM.getConverterLookup().lookupConverterForType(org.jenkinsci.plugins.xvfb.XvfbEnvironmentConverter.class)) | |
def lookup = Jenkins.XSTREAM.getConverterLookup() | |
def field = lookup.getClass().getDeclaredFields()[0] | |
field.setAccessible(true); | |
println(field) | |
lookup = field.get(lookup) | |
println(lookup) | |
println(lookup.getClass().getPackage().getImplementationVersion()) | |
field = lookup.getClass().getDeclaredField('typeToConverterMap'); | |
field.setAccessible(true); | |
println(field.get(lookup)[null]); | |
lookup.flushCache() | |
Jenkins.XSTREAM.registerConverter(new org.jenkinsci.plugins.xvfb.XvfbEnvironmentConverter(), 10) | |
println(Jenkins.XSTREAM.getConverterLookup().lookupConverterForType(org.jenkinsci.plugins.xvfb.XvfbEnvironmentConverter.class)) |