Hi, I am trying to diagnose a potential issue with this plugin and have 
downloaded the source (from https://github.com/jenkinsci/kubernetes-plugin).

I am running Minikube and have the latest version of Maven. When I try to 
build the plugin with the command `mvn clean install 
-DconnectorHost=0.0.0.0` I always get at least one integration test failure 
and then the build fails. Failures typically look like:

```
[INFO] Running 
org.csanchez.jenkins.plugins.kubernetes.pipeline.KubernetesPipelineTest
[ERROR] Tests run: 27, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 
592.425 s <<< FAILURE! - in 
org.csanchez.jenkins.plugins.kubernetes.pipeline.KubernetesPipelineTest
[ERROR] 
cascadingDelete(org.csanchez.jenkins.plugins.kubernetes.pipeline.KubernetesPipelineTest)
  
Time elapsed: 180.127 s  <<< ERROR!
org.junit.runners.model.TestTimedOutException: test timed out after 180 
seconds
        at java.base@12.0.1/java.lang.Thread.sleep(Native Method)
        at 
app//org.jvnet.hudson.test.JenkinsRule.waitForCompletion(JenkinsRule.java:1430)
        at 
app//org.csanchez.jenkins.plugins.kubernetes.pipeline.KubernetesPipelineTest.cascadingDelete(KubernetesPipelineTest.java:404)
        at 
java.base@12.0.1/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method)
        at 
java.base@12.0.1/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
java.base@12.0.1/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base@12.0.1/java.lang.reflect.Method.invoke(Method.java:567)
        at 
app//org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
        at 
app//org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at 
app//org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
        at 
app//org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
        at 
app//org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
        at 
app//org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
        at 
app//org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
        at 
app//org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
        at app//org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
        at 
app//org.jvnet.hudson.test.JenkinsRule$1.evaluate(JenkinsRule.java:600)
        at 
app//org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298)
        at 
app//org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292)
        at 
java.base@12.0.1/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base@12.0.1/java.lang.Thread.run(Thread.java:835)

[ERROR] 
computerCantBeConfigured(org.csanchez.jenkins.plugins.kubernetes.pipeline.KubernetesPipelineTest)
  
Time elapsed: 0.493 s  <<< ERROR!
org.jvnet.hudson.reactor.ReactorException: java.lang.Error: 
java.lang.reflect.InvocationTargetException
        at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:282)
        at jenkins.InitReactorRunner.run(InitReactorRunner.java:48)
        at jenkins.model.Jenkins.executeReactor(Jenkins.java:1152)
        at jenkins.model.Jenkins.<init>(Jenkins.java:959)
        at hudson.model.Hudson.<init>(Hudson.java:85)
        at org.jvnet.hudson.test.JenkinsRule.newHudson(JenkinsRule.java:675)
        at org.jvnet.hudson.test.JenkinsRule.before(JenkinsRule.java:402)
        at 
org.jvnet.hudson.test.JenkinsRule$1.evaluate(JenkinsRule.java:595)
        at 
org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298)
        at 
org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292)
        at 
java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.lang.Thread.run(Thread.java:835)
Caused by: java.lang.Error: java.lang.reflect.InvocationTargetException
        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:296)
        at jenkins.model.Jenkins$5.runTask(Jenkins.java:1118)
        at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
        at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        ... 1 more
Caused by: java.lang.reflect.InvocationTargetException
        at jdk.internal.reflect.GeneratedMethodAccessor93.invoke(Unknown 
Source)
        at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:567)
        at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104)
        ... 8 more
Caused by: java.lang.IllegalStateException: Jenkins.instance is missing. 
Read the documentation of Jenkins.getInstanceOrNull to see what you are 
doing wrong.
        at jenkins.model.Jenkins.get(Jenkins.java:772)
        at 
org.jenkinsci.plugins.workflow.cps.nodes.StepDescriptorCache.getPublicCache(StepDescriptorCache.java:48)
        at 
org.jenkinsci.plugins.workflow.cps.nodes.StepDescriptorCache.invalidateGlobalCache(StepDescriptorCache.java:55)
        ... 12 more
```

I'm building off the last good version (1.20.0), on a Mac, and have not 
changed anything.

Could someone give me a pointer to get started please?


Thanks
Andrew

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/e539da6c-7f67-4d67-8df2-77b3da4182e5%40googlegroups.com.

Reply via email to