Reputation: 321
I keep getting this error: "No signature of method: zip.call()"
This is the code i am running in Jenkins pipeline :
pipeline {
agent any
stages {
stage("test..")
{
steps
{
zip dir: '', glob: '', zipFile: 'testz.zip'
}
}
}
}
I have the zip step appear in sample steps in pipeline syntax, so not sure why this failing. I need to zip my source code folder.
Pipeline Utility Steps plugins is installed :
Upvotes: 2
Views: 15343
Reputation: 339
Try this:
pipeline {
agent any
stages {
stage("test.."){
steps{
script{
zip archive: true, dir: '', glob: '', zipFile: 'testz.zip'
}
}
}
}
}
Reference: https://jenkins.io/doc/pipeline/steps/pipeline-utility-steps/#zip-create-zip-file
Upvotes: 3
Reputation: 10395
Try to wrap zip
step with script {}
pipeline {
agent any
stages {
stage("test..") {
steps {
script {
zip dir: '', glob: '', zipFile: 'testz.zip'
}
}
}
}
}
Upvotes: 0