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

Zip step fails to execute and dies with syntax error in a parallel stage with post step

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Labels:
      None
    • Environment:
    • Similar Issues:

      Description

      We have a Jenkins job which tests out product using different tools such as sbt, maven, gradle and so on. Our build runs in parallel on multiple nodes and we wanted to "zip" some artifacts from the target directories for easier debugging.

      According to the documentation (as well as the generated Pipeline snippet from the Pipeline Syntax page) the following line should be working just fine:

      zip archive: true, dir: './maven/target', glob: '', zipFile: 'maven-target.zip'
      

      Unfortunately this is not the case and we receive the following exception:

      org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
      WorkflowScript: 43: Invalid parameter "archive", did you mean "url"? @ line 43, column 33.
                                     zip archive: true, dir: './maven/target', glob: '', zipFile: 'maven-target.zip'
                                         ^
      
      WorkflowScript: 43: Invalid parameter "dir", did you mean "url"? @ line 43, column 48.
                    zip archive: true, dir: './ma
                                       ^
      
      WorkflowScript: 43: Invalid parameter "glob", did you mean "label"? @ line 43, column 71.
          true, dir: './maven/target', glob: '', 
                                       ^
      
      WorkflowScript: 43: Invalid parameter "zipFile", did you mean "label"? @ line 43, column 81.
         : './maven/target', glob: '', zipFile: '
                                       ^
      
      4 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:133)
      	at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:127)
      	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:557)
      	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:518)
      	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:290)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:429)
      Finished: FAILURE
      

      I've attached the Jenkinsfile we currently have as well as the log file. This issue appears to be similar to JENKINS-44078.

       

        Attachments

          Issue Links

            Activity

            stodorov Steve Todorov created issue -
            stodorov Steve Todorov made changes -
            Field Original Value New Value
            Link This issue relates to JENKINS-44078 [ JENKINS-44078 ]
            Show
            andreas_urban Andreas Urban added a comment - Works in script blocks: https://issues.jenkins-ci.org/browse/JENKINS-44078?focusedCommentId=349855&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-349855

              People

              Assignee:
              rsandell rsandell
              Reporter:
              stodorov Steve Todorov
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated: