Вот часть моего пайпа '''
stage('build') {
steps {
script {
docker.build("${env.IMAGENAME}:${env.LAST_COMMIT_TAG}")
}
}
}
stage('Deploy image') {
steps {
script{
docker.withRegistry(IMAGEHUBURL , CREDENTIALDOCKERHUB) {
docker.image("${env.IMAGENAME}:${env.LAST_COMMIT_TAG}").push()
}
}
}
}
stage('Delete docker image locally') {
steps{
docker.image("${env.IMAGENAME}:${env.LAST_COMMIT_TAG}").remove(message: "Removing outdated image")
}
}
'''
ошибка
"org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: 237: Expected a symbol @ line 237, column 17. docker.image("${env.IMAGENAME}:${env.LAST_COMMIT_TAG}").remove(message: "Removing outdated image") ^
1 error
at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:309)
at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1107)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:624)
at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:602)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:579)
at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:323)
at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:293)
at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox$Scope.parse(GroovySandbox.java:163)
at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.doParse(CpsGroovyShell.java:190)
at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:175)
at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:568)
at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:518)
at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:336)
at hudson.model.ResourceController.execute(ResourceController.java:101)
at hudson.model.Executor.run(Executor.java:442)
Finished: FAIL"
Ругается он именно на docker.image().remove().В чем может быть проблема?