Hi, I have problem with setting docker agent type for my pipeline.
Although something like this works:
agent {
docker 'myimage'
}
This does not:
agent {
docker {
image: 'myimage'
registry: 'localhost:5000'
}
}
As I'm getting error:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
WorkflowScript: 3: Expected to find someKey "someValue" @ line 3, column 12.
docker {
^
WorkflowScript: 3: Missing required parameter for agent type "docker": image @
line 3, column 5.
docker {
^
2 errors
at
org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310)
at
org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1073)
at
org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:591)
at
org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:569)
at
org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:546)
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.reparse(CpsGroovyShell.java:67)
at
org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:429)
at
org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:392)
at
org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:221)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:404)
Finished: FAILURE
How I make it work?
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/b01854b3-e9e2-49ba-ab4e-9b20bd8200dc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.