I have a Jenkins job which triggers a remote job. Both the jobs have a multiline string as paramter. I am not able to pass the parameter to the remote job. Only the first line of my input string is passed to the remote job.

Is it not possible to trigger a remote job with multiline string?

  def parameters = 'ip_range='
     parameters = parameters + "${it}" + "\n"
  parameters = parameters + "\n"+'remote_branch='+env.BRANCH_NAME

also tried

  def parameters = 'ip_range=' + params.ip_range + "\n"+'remote_branch='+env.BRANCH_NAME

Both cases only the first value is passed on as paramter to the remote job.

Console output of jenkins job from either methods

  • parameters: [ip_range=,, remote_branch=21.4.0/INSURECI-203156]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.