x
login Signup

How to use Jenkins plugin for multibranch jobs?

When using EC-Jenkins-1.8.4.42-> DownloadArtifacts procedure, if the job_name parameter value contains a slash (ex: build/deploy), it fails with the following error:

Use of uninitialized value in array dereference at /tmp/ecmdrAgent/agent.IDJQXKR3MMW1CHUG.run-9dae9e3f-87ce-11e9-98f6-005056affdfc-9e569d57-87ce-11e9-9e52-005056affdfc.cmd line 56. No artifacts to download.

We are using a multi branch pipeline for CI jobs and that by default the job names are /< CI jobs>.

avatar image By nturba 30 asked Jun 13 at 03:00 PM
more ▼
(comments are locked)
10|750 characters needed characters left

1 answer: sort voted first

The documentation is not clear on this particular nuance, as it is not the slash that cannot be accepted, but specific formatting that must be used. For referencing multibranch jobs. In order for this to work, you need to place the "/job/" between your two levels of the jenkins job (e.g.):

 <jobName>/job/<branchName>

Also, 'branch' part should be URL-encoded (e.g.):

 'feature/no-manual-step' -> 'feature%252Fno-manual-step'
avatar image By nturba 30 answered Jun 13 at 03:00 PM
more ▼
(comments are locked)
10|750 characters needed characters left
Your answer
toggle preview:

Up to 8 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.