-
Bug
-
Resolution: Fixed
-
Critical
-
None
-
Plugin version 2.15 Jenkins ver. 1.447.2
Started by upstream project "Experimental_bobby_MatrixParameterized" build number 2
Building on master
[nisse] $ /bin/sh -xe /srv/hudson/tomcat/latest/temp/hudson5741840414633660975.sh
+ echo another
FATAL: Can't parse test2
java.lang.IllegalArgumentException: Can't parse test2
at hudson.matrix.Combination.fromString(Combination.java:218)
at hudson.matrix.MatrixProject.getItem(MatrixProject.java:442)
at hudson.matrix.MatrixProject.getItem(MatrixProject.java:91)
at jenkins.model.Jenkins.getItem(Jenkins.java:2142)
at jenkins.model.Jenkins.getItem(Jenkins.java:2163)
at hudson.model.Items.fromNameList(Items.java:100)
at hudson.plugins.parameterizedtrigger.BuildTriggerConfig.getProjectList(BuildTriggerConfig.java:132)
at hudson.plugins.parameterizedtrigger.BuildTriggerConfig.perform2(BuildTriggerConfig.java:241)
at hudson.plugins.parameterizedtrigger.BlockableBuildTriggerConfig.perform2(BlockableBuildTriggerConfig.java:56)
at hudson.plugins.parameterizedtrigger.TriggerBuilder.perform(TriggerBuilder.java:96)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:697)
at hudson.model.Build$RunnerImpl.build(Build.java:178)
at hudson.model.Build$RunnerImpl.doRun(Build.java:139)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:467)
at hudson.model.Run.run(Run.java:1404)
at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:238)
I have also seen this while trying to test other behaviour for the conditional buildstep plugin.
However in this case I do not see the exception as this is consumed by the conditional buildstep Runner.
however I do see the the following
"ERROR: Build aborted. No projects to trigger. Check your configuration!"
Looking at the code it points to the function at hudson.plugins.parameterizedtrigger.BuildTriggerConfig.getProjectList(BuildTriggerConfig.java:132)
returning an empty list.
This is called as
List<AbstractProject> projectList = config.getProjectList(build.getProject().getParent(),env);
However when this is a Matrix project
build is a MatrixBuild, and get Project gets the MatrixConfiguration and the parent of that is the MatrixProject which implements the ItemGroup<MatrixConfiguration>
So when Items.fromNameList(context, projectNames.toString(), AbstractProject.class) is called in the context is the MatrixProject so tries to get the project from that.
public List<AbstractProject> getProjectList(ItemGroup context, EnvVars env)
Possible solution would be to do
build.getRootBuild().getProject().getParent()
which should give the topbuild item in the tree