SHARE
TWEET

Untitled

a guest Jan 12th, 2017 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!groovy
  2. node{
  3.     stage("build jobs"){
  4.         ws{
  5.                 git poll: true,  credentialsId: 'xxxxx', url: 'ssh://git@aaaaa.cc.xxxxxx.com:/xxx/xxx-xxxx-xxxxx.git'
  6.                 checkout scm
  7.                 jobDsl(removedJobAction: 'DISABLE', removedViewAction: 'DELETE', targets: 'jobs/*.groovy', unstableOnDeprecation: true)
  8.             }
  9.     }
  10. }
  11.    
  12. hudson.FilePath workspace = hudson.model.Executor.currentExecutor().getCurrentWorkspace()
  13.    
  14. Processing DSL script pipeline.groovy
  15. java.lang.NullPointerException: Cannot invoke method getCurrentWorkspace() on null object
  16.     at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:91)
  17.     at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:48)
  18.     at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
  19.     at org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:35)
  20.     at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
  21.     at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
  22.     at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
  23.     at pipeline.run(pipeline.groovy:1)
  24.     at pipeline$run.call(Unknown Source)
RAW Paste Data
Top