Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-47780

copyartifact plugin breaks Jenkinsfile upstream triggers

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Blocker
    • Resolution: Fixed
    • copyartifact-plugin
    • None
    • 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

    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

          Activity

            marcus_0x0 Marcus H created issue -
            marcus_0x0 Marcus H made changes -
            Field Original Value New Value
            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]):

            triggers \{ upstream (upstreamProjects: 'job1', threshold: hudson.model.Result.SUCCESS) }

             
            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
             

            After reverting copyartifact plugin to 1.38.1 (or uninstalling it) everything is working fine again.

             
            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:
            {noformat}
            pipeline {
                agent any
                triggers {
                    upstream (
                        upstreamProjects: 'job1', threshold: hudson.model.Result.SUCCESS
                    )
                }
                stages {
                    stage('Example') {
                        steps {
                            echo 'Hello World'
                        }
                    }
                }
            }
            {noformat}
             

            Error message:
            {noformat}
            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
            {noformat}
             

            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.
            ikedam ikedam made changes -
            Link This issue is related to JENKINS-47781 [ JENKINS-47781 ]
            scm_issue_link SCM/JIRA link daemon made changes -
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Resolved [ 5 ]
            ikedam ikedam made changes -
            Assignee ikedam [ ikedam ] Marcus H [ marcus_0x0 ]
            ikedam ikedam made changes -
            Status Resolved [ 5 ] Closed [ 6 ]

            People

              marcus_0x0 Marcus H
              marcus_0x0 Marcus H
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: