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

Forward slash in branch name makes artifact inaccessible

XMLWordPrintable

      When multibranch project contains branch with forward slash in the name (for example `feature/foobar`) corresponding Job gets name `feature%2Ffoobar`  from multibranch pipeline plugin.

      artifact-manager-s3 plugin later uses this name to generate object key:
      https://github.com/jenkinsci/artifact-manager-s3-plugin/blob/master/src/main/java/io/jenkins/plugins/artifact_manager_jclouds/JCloudsArtifactManager.java#L98

      As a result generated artifact will be placed in directory hierarchy like this:

      projectname/feature%2Ffoobar/1/artifacts/example.txt

      However when we try to download this artifact via http url
      https://bucketname.s3.amazonaws.com/projectname/feature%2Ffoobar/1/artifacts/example.txt

      %2F will be converted to forward slash by browser and request fails with NoSuchKey error from AWS.

      When branch name doesn't contain forward slash everything works as expected

            jglick Jesse Glick
            alapshin Andrei Lapshin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: