continuous-deployment-on-kubernetes icon indicating copy to clipboard operation
continuous-deployment-on-kubernetes copied to clipboard

Jenkins started failing to do new builds due to Kubernetes lately

Open skjagini opened this issue 4 years ago • 0 comments

Hi

I have Jenkins running on Kubernetes as per this repo, started noticing from yesterday that my builds are failing due to the following error Seen branch in repository origin/master Seen 1 remote branch Obtained Jenkinsfile from 190653029108941c19b8f712b77cab8a5c2cdb3a Running in Durability level: MAX_SURVIVABILITY org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: 8: Invalid agent type "kubernetes" specified. Must be one of [any, docker, dockerfile, label, none] @ line 8, column 5. kubernetes { ^

1 error

at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310)
at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1085)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:603)
at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:581)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:558)
at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298)
at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268)
at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688)
at groovy.lang.GroovyShell.parse(GroovyShell.java:700)
at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.doParse(CpsGroovyShell.java:142)
at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:127)
at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:561)
at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:522)
at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:327)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:427)

Finished: FAILURE

On Jenkins I see the following warning: Kubernetes plugin version 1.25.0 You must update Jenkins from version 2.204.5 to version 2.217 or later to run this plugin.

I even updated my GCP Kubernetes latest available version (1.15.9-gke.22) to see if this issue can be mitigated

Has anyone faced similar issue? Did upgrading Jenkins worked for you (any instructions as say to upgrade ). Thanks

skjagini avatar Mar 11 '20 16:03 skjagini