mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-18 13:35:50 +00:00
Jenkins: Init global variables in order to avoid NPE.
Occurs in Jenkins ver. 2.73.3 and Pipeline: Groovy Plugin 2.42. java.lang.NullPointerException at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovyCallSiteSelector.isVarArgsMethod(GroovyCallSiteSelector.java:231) at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovyCallSiteSelector.findMatchingMethod(GroovyCallSiteSelector.java:200) at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovyCallSiteSelector.staticMethod(GroovyCallSiteSelector.java:193) at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onStaticCall(SandboxInterceptor.java:153) at org.kohsuke.groovy.sandbox.impl.Checker$2.call(Checker.java:186) at org.kohsuke.groovy.sandbox.impl.Checker.checkedStaticCall(Checker.java:190) at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:97) at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17) at WorkflowScript.run(WorkflowScript:42) at ___cps.transform___(Native Method)
This commit is contained in:
parent
6ec7e7eee2
commit
3c5b37e451
1 changed files with 4 additions and 3 deletions
7
Jenkinsfile
vendored
7
Jenkinsfile
vendored
|
@ -52,9 +52,10 @@ node {
|
|||
junit allowEmptyResults: true, testResults: '**/target/failsafe-reports/TEST-*.xml,**/target/surefire-reports/TEST-*.xml'
|
||||
}
|
||||
|
||||
String cesFqdn
|
||||
String cesUrl
|
||||
def credentials
|
||||
// Init global vars in order to avoid NPE
|
||||
String cesFqdn = ''
|
||||
String cesUrl = ''
|
||||
def credentials= {}
|
||||
|
||||
void mvn(String args) {
|
||||
writeSettingsXml()
|
||||
|
|
Loading…
Reference in a new issue