Add an unstable job result
Many CI systems, such as Jenkins, can return an 'unstable'[1] result
from a build job. Interpret a score of 0 as an unstable result and
apply an exclamation icon for that score.
[1] https://wiki.jenkins-ci.org/display/JENKINS/Terminology
Change-Id: I520c7e0d53ee3349fe5e6058a630bd0d91f61a48
diff --git a/src/main/java/com/googlesource/gerrit/plugins/verifystatus/client/JobsDropDownPanel.java b/src/main/java/com/googlesource/gerrit/plugins/verifystatus/client/JobsDropDownPanel.java
index e7fff26..2725595 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/verifystatus/client/JobsDropDownPanel.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/verifystatus/client/JobsDropDownPanel.java
@@ -82,6 +82,8 @@
p.add(new Image(VerifyStatusPlugin.RESOURCES.greenCheck()));
} else if (vote < 0) {
p.add(new Image(VerifyStatusPlugin.RESOURCES.redNot()));
+ } else if (vote == 0) {
+ p.add(new Image(VerifyStatusPlugin.RESOURCES.warning()));
}
p.add(new InlineHyperlink(job.getKey(), job.getValue().url()));
p.add(new InlineLabel("(" + job.getValue().duration() + ")"));
diff --git a/src/main/java/com/googlesource/gerrit/plugins/verifystatus/client/JobsPanel.java b/src/main/java/com/googlesource/gerrit/plugins/verifystatus/client/JobsPanel.java
index 143daab..feef675 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/verifystatus/client/JobsPanel.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/verifystatus/client/JobsPanel.java
@@ -81,6 +81,8 @@
p.add(new Image(VerifyStatusPlugin.RESOURCES.greenCheck()));
} else if (vote < 0) {
p.add(new Image(VerifyStatusPlugin.RESOURCES.redNot()));
+ } else if (vote == 0) {
+ p.add(new Image(VerifyStatusPlugin.RESOURCES.warning()));
}
p.add(new InlineHyperlink(job.getKey(), job.getValue().url()));
p.add(new InlineLabel(" (" + job.getValue().duration() + ")"));
diff --git a/src/main/java/com/googlesource/gerrit/plugins/verifystatus/client/Resources.java b/src/main/java/com/googlesource/gerrit/plugins/verifystatus/client/Resources.java
index 5d7151f..8e51bcd 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/verifystatus/client/Resources.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/verifystatus/client/Resources.java
@@ -30,4 +30,7 @@
@Source("information.png")
public ImageResource info();
+
+ @Source("exclamation.png")
+ public ImageResource warning();
}
diff --git a/src/main/java/com/googlesource/gerrit/plugins/verifystatus/client/exclamation.png b/src/main/java/com/googlesource/gerrit/plugins/verifystatus/client/exclamation.png
new file mode 100644
index 0000000..c37bd06
--- /dev/null
+++ b/src/main/java/com/googlesource/gerrit/plugins/verifystatus/client/exclamation.png
Binary files differ
diff --git a/src/main/resources/Documentation/about.md b/src/main/resources/Documentation/about.md
index 479044a..a51943a 100644
--- a/src/main/resources/Documentation/about.md
+++ b/src/main/resources/Documentation/about.md
@@ -34,11 +34,18 @@
### <a id="job-results"></a>
### `Job Results`
-Job result scores represent the results from the executed build. These
-scores are independent of the Gerrit label (i.e. `Verified`) score. The
+The job score (or value) is the result from the executed build. This
+score is independent of the Gerrit label (i.e. `Verified`) score. The
reporter scores each build job and then (if given permission) scores the
combined Verified vote.
+|Score |Result |
+|:------------- |:-------|
+|less than 0 |Failed |
+|0 |Unstable|
+|greater than 0 |Passed |
+
+
The information icon is an indicator that a job has abstained from voting
(or is a non-voting job). Abstaining typically indicates that a job's
score may not factor into determining the combined vote.
diff --git a/src/main/resources/Documentation/images/job_results.png b/src/main/resources/Documentation/images/job_results.png
index c8b5aa2..c191a0d 100644
--- a/src/main/resources/Documentation/images/job_results.png
+++ b/src/main/resources/Documentation/images/job_results.png
Binary files differ