Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[JENKINS-21345] improved explanation for the aggregation condition.
  • Loading branch information
ikedam committed Feb 1, 2014
1 parent 9145b7c commit 7c0d2df
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
Expand Up @@ -36,6 +36,7 @@
import hudson.model.BuildListener;
import hudson.model.DependecyDeclarer;
import hudson.model.DependencyGraph;
import hudson.model.Describable;
import hudson.model.Descriptor;
import hudson.model.Hudson;
import hudson.model.Result;
Expand Down Expand Up @@ -248,6 +249,22 @@ public MatrixAggregator createAggregator(

for (ConditionalPublisher cp: getPublishers()) {
if (!(cp.getPublisher() instanceof MatrixAggregatable)) {
if (cp.isConfiguredAggregation()) {
// Condition for Matrix Configuration is configured,
// but this publisher does not support aggregation!
if (cp.getPublisher() instanceof Describable<?>) {
listener.getLogger().println(String.format(
"[%s] WARNING: Condition for Matrix Aggregation is configured for %s which does not support aggregation",
getDescriptor().getDisplayName(),
((Describable<?>)cp.getPublisher()).getDescriptor().getDisplayName()
));
} else {
listener.getLogger().println(String.format(
"[%s] WARNING: Condition for Matrix Aggregation is configured for a publisher without aggregation support",
getDescriptor().getDisplayName()
));
}
}
continue;
}

Expand Down
Expand Up @@ -2,12 +2,12 @@
Specifies a condition for execution on the parent build.
When a publisher works on a multi-configuration project, it runs in two ways in general:
<ul>
<li>Runs on a build for each axe combination.</li>
<li>Runs on a build for whole the project. It is often called aggregation.</li>
<li>Runs on a build for each axes combination.</li>
<li>Runs on a parent build, which is the build for whole the project. It is often called aggregation. Not every publisher supports this as this requires pubishers extra implementation for multi-configuration projects.</li>
</ul>
For example, "Publish JUnit test result report" works in following two ways:
For example, "Publish JUnit test result report" is designed for multi-configuration projects and works in following two ways:
<ul>
<li>Summarize JUnit results generated in a build with a particular axe combination.</li>
<li>Summarize results of builds of all the axe combination as a result of whole the project.</li>
<li>Summarize results of builds of all the axes combinations as a result of whole the project.</li>
</ul>
</div>

0 comments on commit 7c0d2df

Please sign in to comment.