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

Cannot specify a build with parameters containing slash("/")

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • copyartifact-plugin
    • None
    • Windows XP
      Jenkins 1.494
      Copy Artifact 1.25

      In a following case, Copy Artifact fails to find the build to copy.

      • In confituration: specify Project name filtering with a build parameters, using variables.
      • In build: use variables containing slash("/").

      For instance:

      • Configure Project name to "SomeParameterizedJob/BRANCH=${value1}"
      • Run build with setting value1 to "origin/develop"

      Even if there is a build with BRANCH=origin/develop in SomeParameterizedJob, this results in a following failure:
      Unable to find project for artifact copy: SomeParameterizedJob/BRANCH=origin/master

      This seems caused for Copy Artifact uses the LAST slash to devide the Project name parameter to the job name and the filter parametes (In CopyArtifact.JobResolver, using lastIndexOf).
      So "SomeParameterizedJob/BRANCH=origin/master" is devided into "SomeParameterizedJob/BRANCH=origin" and "master".

      Job names never contain slashes, and how about replaces lastIndexOf to indexOf to use the FIRST slash to devide the project name?

            Unassigned Unassigned
            ikedam ikedam
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: