Guest User

Untitled

a guest
Oct 20th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. def job = hudson.model.Hudson.instance.getJob("job")
  2. def params = new StringParameterValue('PARAMTEST', "somestring")
  3. def paramsAction = new ParametersAction(params)
  4. def cause = new hudson.model.Cause.UpstreamCause(currentBuild)
  5. def causeAction = new hudson.model.CauseAction(cause)
  6. def scheduledJob = hudson.model.Hudson.instance.queue.schedule(job, 0, causeAction, paramsAction)
  7.  
  8. def url = scheduledJob.getFuture().waitForStart().getUrl()
Add Comment
Please, Sign In to add comment