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

            ikedam ikedam added a comment - Created a pull request: https://github.com/jenkinsci/copyartifact-plugin/pull/95

            Code changed in jenkins
            User: Andrew Bayer
            Path:
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/parser/ASTParserUtils.groovy
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/parser/RuntimeASTTransformer.groovy
            pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/TriggersTest.java
            pipeline-model-definition/src/test/resources/actualTriggerCorrectScope.groovy
            http://jenkins-ci.org/commit/pipeline-model-definition-plugin/1a54eb838def9a5a0cb6f7ffcf2658621d914f4f
            Log:
            [FIXED JENKINS-47780] Fix instantiation time scoping of describables

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/parser/ASTParserUtils.groovy pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/parser/RuntimeASTTransformer.groovy pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/TriggersTest.java pipeline-model-definition/src/test/resources/actualTriggerCorrectScope.groovy http://jenkins-ci.org/commit/pipeline-model-definition-plugin/1a54eb838def9a5a0cb6f7ffcf2658621d914f4f Log: [FIXED JENKINS-47780] Fix instantiation time scoping of describables

            Code changed in jenkins
            User: Andrew Bayer
            Path:
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/parser/ASTParserUtils.groovy
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/parser/RuntimeASTTransformer.groovy
            pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/TriggersTest.java
            pipeline-model-definition/src/test/resources/actualTriggerCorrectScope.groovy
            http://jenkins-ci.org/commit/pipeline-model-definition-plugin/f5672618087f5fc43b37b91c60587dd33c168e04
            Log:
            Merge pull request #215 from abayer/jenkins-47780-mk2

            [FIXED JENKINS-47780] Fix instantiation time scoping of describables

            Compare: https://github.com/jenkinsci/pipeline-model-definition-plugin/compare/73124e3faa9d...f5672618087f

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/parser/ASTParserUtils.groovy pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/parser/RuntimeASTTransformer.groovy pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/TriggersTest.java pipeline-model-definition/src/test/resources/actualTriggerCorrectScope.groovy http://jenkins-ci.org/commit/pipeline-model-definition-plugin/f5672618087f5fc43b37b91c60587dd33c168e04 Log: Merge pull request #215 from abayer/jenkins-47780-mk2 [FIXED JENKINS-47780] Fix instantiation time scoping of describables Compare: https://github.com/jenkinsci/pipeline-model-definition-plugin/compare/73124e3faa9d...f5672618087f
            ikedam ikedam added a comment -

            marcus_0x0
            Fixed in "Pipeline: Declarative" (pipeline-mode-definition-plugin) 1.2.4.
            It's available in the update center. Please try that.

            ikedam ikedam added a comment - marcus_0x0 Fixed in "Pipeline: Declarative" (pipeline-mode-definition-plugin) 1.2.4. It's available in the update center. Please try that.
            marcus_0x0 Marcus H added a comment -

            ikedam

            Works perfectly. Thanks a lot.

            marcus_0x0 Marcus H added a comment - ikedam Works perfectly. Thanks a lot.

            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: