Advertisement
Guest User

Untitled

a guest
Nov 25th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. def static setSecrets(Job delegate, Map overrides = [:]) {
  2. def liveUsername
  3. def livePassword
  4. def file
  5. new URL('https://path/file').withInputStream { i ->
  6. file.withOutputStream {
  7. it << i
  8. }
  9. }
  10. file.withReader { liveUsername = it.readLines().get(0) }
  11. file.withReader { livePassword = it.readLines().get(1) }
  12.  
  13. def options = [
  14. IDENTITY_USER: liveUsername,
  15. IDENTITY_PASSWORD: livePassword]
  16.  
  17. setEnv(delegate, options, overrides)
  18.  
  19. }
  20.  
  21. java.lang.NullPointerException: Cannot invoke method withOutputStream() on null object
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement