'Script section is not working in pipeline script in shared library
My Jenkins file:
@Library("shared@dev")_
Start()
My Start.groovy pipeline script:
def call() {
pipeline {
agent any
stages {
stage("init") {
steps {
script {
asd = 'asd'
}
}
}
}
}
}
I got error:
hudson.remoting.ProxyException: groovy.lang.MissingMethodException: No signature of method: script.call() is applicable for argument types: (org.jenkinsci.plugins.workflow.cps.CpsClosure2) values: [org.jenkinsci.plugins.workflow.cps.CpsClosure2@295c00c8] Possible solutions: wait(), any(), wait(long), main([Ljava.lang.String;), any(groovy.lang.Closure), each(groovy.lang.Closure)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|