Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def job = hudson.model.Hudson.instance.getJob("job")
- def params = new StringParameterValue('PARAMTEST', "somestring")
- def paramsAction = new ParametersAction(params)
- def cause = new hudson.model.Cause.UpstreamCause(currentBuild)
- def causeAction = new hudson.model.CauseAction(cause)
- def scheduledJob = hudson.model.Hudson.instance.queue.schedule(job, 0, causeAction, paramsAction)
- def url = scheduledJob.getFuture().waitForStart().getUrl()
Add Comment
Please, Sign In to add comment