Details
-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Blocker
-
Resolution: Fixed
-
Component/s: copyartifact-plugin
-
Labels:None
-
Environment:Jenkins 2.87, copyartifact 1.39, OpenJDK 1.8.0_144
Fresh installation on Ubuntu 17.10 with Jenkins BlueOcean and Pipeline plugins as of 01.11.2017
-
Similar Issues:
Description
Upgrading copyartifact plugin from 1.38.1 to 1.39 is breaking pipelines with upstream triggers in Jenkinsfile (as documented in https://jenkins.io/doc/book/pipeline/syntax/#triggers):
Used Jenkinsfile:
pipeline { agent any triggers { upstream ( upstreamProjects: 'job1', threshold: hudson.model.Result.SUCCESS ) } stages { stage('Example') { steps { echo 'Hello World' } } } }
Error message:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: 5: Invalid parameter "upstreamProjects", did you mean "upstreamFilterStrategy"? @ line 5, column 13. upstreamProjects: 'job1', threshold: hudson.model.Result.SUCCESS ^ WorkflowScript: 5: Invalid parameter "threshold", did you mean "upstreamFilterStrategy"? @ line 5, column 39. upstreamProjects: 'job1', threshold: hudson.model.Result.SUCCESS ^ 2 errors 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:129) at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:123) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:517) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:480) at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:269) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:421) Finished: FAILURE
Steps to reproduce:
Install Jenkins with Pipeline, BlueOcean and CopyArtifact plugins and create multibranch project with supplied Jenkinsfile.
Workaround:
After reverting copyartifact plugin to 1.38.1 (or uninstalling it) everything is working fine again.
Attachments
Issue Links
- is related to
-
JENKINS-47781 declarative pipeline upstream trigger syntax not compiling anymore
-
- Closed
-
Created a pull request: https://github.com/jenkinsci/copyartifact-plugin/pull/95