Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-45722

'Github branch source' job name is double escaped, while env.JOB_NAME is escaped once

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • None
    • Jenkins ver. 2.60.1
      GitHub Branch Source Plugin 2.0.7

      Job name for a branch with a slash is double escaped in job URL:
      https://jenkins.mydomain.com/view/myview/job/github_org/job/github_repo/job/first_part_of_branch%252Fpart_of_branch_after_slash/
      Note that slash in branch first_part_of_branch/part_of_branch_after_slash was escaped twice, giving %252F.
      A path to artefacts also contains double escaped slash.

      Pipeline command echo env.JOB_NAME prints job name with branch name escaped once:
      github_org/github_repo/first_part_of_branch%2Fpart_of_branch_after_slash/
      Slash escaped once to %2F.

      As a result of this inconsistency, env.JOB_NAME cannot be used to communicate job and artefacts URLs to 3rd party services.

            Unassigned Unassigned
            vorobievalex Alexander Vorobiev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: