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

Finding build job by build parameter fails

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • copyartifact-plugin
    • None

      We need to copy some artifacts from another build job than the one that triggered the current build.

       

      Since we are passing the git SHA through our build pipeline it seemed obvious to use the "Build parameter" selector to find the specific build where the build parameter eg. GIT_SHA would match the one for the current job using the copy-artifact plugin.

       

      Unfortunately using eg. GIT_SHA as the parameter name fails with an error like:

      Failed to resolve selector: ba5d19d8eed45165df21a5550d86b704cf2cc3a8 javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1]

       

      Looking a bit at the source code it does seem like the code in ParameterizedBuildSelector passes the parameter value as XML and tries to parse that in order to find the build which obviously fails.

       

      It is very likely that I've simply misunderstood how this selector is supposed to work, but to me it does indeed look like a bug. At least it is far from clear how this is supposed to work otherwise.

       

      If my suspicion is correct and this is indeed a bug, I wouldn't mind digging more into it and potentially come up with a pull request that fixes this. It seems like there are some tests in place already but not for this specific selector which could be a good starting point.

       

      Before I do so I would very much appreciate it if it could at least be confirmed that this is indeed a bug.

       

      Thanks a lot.

            Unassigned Unassigned
            laudrup Kasper
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: