BUILD_SELECTOR is not passed to matrix subprojects

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      A parameter of the type "Build selector for Copy Artifact" works fine when using it in an freestyle job, it copies the artifacts and the windows script

      echo "%BUILD_SELECTOR%"

      prints as expected:

      00:00:00.059 [IntegrationTest] $ cmd /c call C:\Users\JENKIN~1\AppData\Local\Temp\hudson******.bat
      00:00:00.095 
      00:00:00.095 C:\Jenkins\workspace\******>echo "<TriggeredBuildSelector plugin="copyartifact@1.38">  <fallbackToLastSuccessful>true</fallbackToLastSuccessful>  <upstreamFilterStrategy>UseNewest</upstreamFilterStrategy>  <allowUpstreamDependencies>true</allowUpstreamDependencies></TriggeredBuildSelector>" 
      00:00:00.095 "<TriggeredBuildSelector plugin="copyartifact@1.38">  <fallbackToLastSuccessful>true</fallbackToLastSuccessful>  <upstreamFilterStrategy>UseNewest</upstreamFilterStrategy>  <allowUpstreamDependencies>true</allowUpstreamDependencies></TriggeredBuildSelector>"
      00:00:00.095 
      00:00:00.095 C:\Jenkins\workspace\******>exit 0 
      00:00:00.107 Setting MSBUILD_12_HOME=C:\Program Files (x86)\MSBuild\12.0\Bin\
      00:00:09.371 Copied 603 artifacts from "******" build number 10
      

      When using the same setup (Build selector parameter; windows batch script and copy artifact step) in an matrix job, we get the following result:

      00:00:00.053 [******] $ cmd /c call C:\Users\JENKIN~1\AppData\Local\Temp\hudson******.bat
      00:00:00.096 
      00:00:00.096 C:\Jenkins\workspace\******>echo "" 
      00:00:00.096 ""
      00:00:00.097 
      00:00:00.097 C:\Jenkins\workspace\******>exit 0 
      00:00:00.110 Setting MSBUILD_12_HOME=C:\Program Files (x86)\MSBuild\12.0\Bin\
      00:00:00.112 ERROR: Unable to find a build for artifact copy from: Build2/BuildConfiguration=Debug,Slave=******
      

      It looks as if the parameter is not passed to the subproject created automatically for each combination. When specifying the Build selector directly (without variable, choosing "Upstream build that triggered this job" instead of "Specified by build selector"), the artifacts are copied.

            Assignee:
            Unassigned
            Reporter:
            Phillip Kuhrt
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: