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

"zip" step is not working according to the documentation

XMLWordPrintable

      When using "zip" as per the documentation:

      zip zipFile: '.tmp/management-console.zip', dir: 'dist', archive: true
      

      I receive the following error message:

      org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
      WorkflowScript: 30: Invalid parameter "zipFile", did you mean "label"? @ line 30, column 21.
                         zip zipFile: '.tmp/app.zip', dir: 'dist', archive: true
                             ^
      
      WorkflowScript: 30: Invalid parameter "dir", did you mean "url"? @ line 30, column 61.
         .tmp/app.zip', dir: 'dist
                                       ^
      
      WorkflowScript: 30: Invalid parameter "archive", did you mean "url"? @ line 30, column 74.
         app.zip', dir: 'dist', archive: t
                                       ^
      
      3 errors
      
      	at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310)
      	at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1073)
      	at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:591)
      	at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:569)
      	at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:546)
      	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.reparse(CpsGroovyShell.java:116)
      	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:430)
      	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:393)
      	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:238)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:405)
      
      

      Were the parameters changed? This is the reference I followed: https://jenkins.io/doc/pipeline/steps/pipeline-utility-steps/#code-zip-code-create-zip-file

            rsandell rsandell
            rochdev Roch Devost
            Votes:
            11 Vote for this issue
            Watchers:
            17 Start watching this issue

              Created:
              Updated: