HOW DOES ANY OF THIS ACTUALLY WORK.
This only seems to fail in production when booting the instance, but not when
this script executes at runtime.
java.lang.ClassCastException: [Lhudson.tools.ToolInstallation; cannot be cast to [Lhudson.plugins.git.GitTool;
at hudson.plugins.git.GitTool.getInstallations(GitTool.java:68)
at hudson.plugins.git.GitTool.onLoaded(GitTool.java:127)
Caused: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104)
Caused: java.lang.Error
at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:110)
at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:175)
at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
at jenkins.model.Jenkins$7.runTask(Jenkins.java:1090)
at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused: org.jvnet.hudson.reactor.ReactorException
at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:269)
at jenkins.InitReactorRunner.run(InitReactorRunner.java:47)
at jenkins.model.Jenkins.executeReactor(Jenkins.java:1124)
at jenkins.model.Jenkins.<init>(Jenkins.java:929)
at hudson.model.Hudson.<init>(Hudson.java:86)
at hudson.model.Hudson.<init>(Hudson.java:82)
at hudson.WebAppMain$3.run(WebAppMain.java:235)
Caused: hudson.util.HudsonFailedToLoad
at hudson.WebAppMain$3.run(WebAppMain.java:252)
When this script executed in production, it hit some thread safety issues.
Hopefully waiting a bit will allow Jenkins to set everything up before we go and
start mutating things.
Aug 22, 2017 2:44:47 AM jenkins.util.groovy.GroovyHookScript execute
WARNING: Failed to run script file:/usr/share/jenkins/ref/init.groovy.d/configure-sentry.groovy
java.util.ConcurrentModificationException
at java.util.Hashtable$Enumerator.next(Hashtable.java:1378)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2039)
at org.codehaus.groovy.runtime.dgm$161.invoke(Unknown Source)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at configure-sentry.run(configure-sentry.groovy:14)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:585)
at jenkins.util.groovy.GroovyHookScript.execute(GroovyHookScript.java:136)
at jenkins.util.groovy.GroovyHookScript.execute(GroovyHookScript.java:127)
at jenkins.util.groovy.GroovyHookScript.run(GroovyHookScript.java:110)
at hudson.init.impl.GroovyInitScript.init(GroovyInitScript.java:41)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104)
at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:175)
at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
at jenkins.model.Jenkins$7.runTask(Jenkins.java:1090)
at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
ew ew ew ew ew ew
I tried stuffing these into /usr/share/jenkins/ref/war/WEB-INF/lib but the
expansion of the jenkins.war clobbers anything that the copy_reference_file
shell function puts into that spot
I attempted to incorporate via
`-Djava.util.logging.config.file=/path/to/app.properties` by adding the
sentry-1.5.0.jar into /var/jenkins_home/war/WEB-INF/libs. Unfortunately it
looks like that's not added to the classpath early enough.
This script will not work unless jackson-core.jar and sentry.jar are added into
war/WEB-INF/libs