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

Cannot specify a build with parameters containing hyphen("-")

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: copyartifact-plugin
    • Labels:
      None
    • Environment:
      Windows 7
      Jenkins 2.82.2
      Copy Artifact 1.39
    • Similar Issues:

      Description

      Copy Artifact fails to find the build to copy when build number is a vairable containing hyphen ("-"). 

       

        Attachments

          Activity

          gillet Laurent Gillet created issue -
          gillet Laurent Gillet made changes -
          Field Original Value New Value
          Summary CLONE - Cannot specify a build with parameters containing slash("/") Cannot specify a build with parameters containing hyphen("-")
          Description 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?
          Copy Artifact fails to find the build to copy when build number is a vairable containing hyphen ("-"). 

           
          Environment Windows XP
          Jenkins 1.494
          Copy Artifact 1.25
          Windows 7
          Jenkins 2.82.2
          Copy Artifact 1.39

            People

            • Assignee:
              Unassigned
              Reporter:
              gillet Laurent Gillet
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: