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

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Minor
    • Environment:

      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.

       

            Assignee:
            rsandell
            Reporter:
            Steve Todorov
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: