mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-09 01:56:03 +00:00
generate CruiseControl compatible XML report to support cctray clients.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@5860 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
e419a0c7ac
commit
afad4ce977
3 files changed
+59
-1
No files matched your search
@@ -690,5 +690,27 @@ public class Functions {
|
||||
return Math.max(5,LINE_END.split(s).length);
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the Hudson build status to CruiseControl build status,
|
||||
* which is either Success, Failure, Exception, or Unknown.
|
||||
*/
|
||||
public static String toCCStatus(Item i) {
|
||||
if (i instanceof Job) {
|
||||
Job j = (Job) i;
|
||||
switch (j.getIconColor().noAnime()) {
|
||||
case ABORTED:
|
||||
case RED:
|
||||
case YELLOW:
|
||||
return "Failure";
|
||||
case BLUE:
|
||||
return "Success";
|
||||
case DISABLED:
|
||||
case GREY:
|
||||
return "Unknown";
|
||||
}
|
||||
}
|
||||
return "Unknown";
|
||||
}
|
||||
|
||||
private static final Pattern LINE_END = Pattern.compile("\r?\n");
|
||||
}
|
||||
Reference in new issue
Block a user