This repository has been archived by the owner on Mar 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 31
/
scratchpad.txt
63 lines (50 loc) · 2.15 KB
/
scratchpad.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
try {
List<SVcsModification> changes = build.getChanges(SelectPrevBuildPolicy.SINCE_LAST_BUILD, true);
logger.debug("changes: " + changes.size());
SVcsModification change = changes.get(0);
logger.debug("vcs committers: " + change.getCommitters().size());
logger.debug("vcs username: " + change.getUserName());
logger.debug("vcs name: " + change.getVersionControlName());
} catch (Exception e) {}
try {
UserSet<SUser> committers = build.getCommitters(SelectPrevBuildPolicy.SINCE_LAST_BUILD);
//logger.debug("build committers: " + );
} catch (Exception e) {}
//BuildStatistics statistics = build.getFullStatistics();
try {
logger.debug("build owner: " + build.getOwner());
} catch (Exception e) {}
try {
TriggeredBy triggeredBy = build.getTriggeredBy();
logger.debug("triggered by: " + triggeredBy.getAsString());
} catch (Exception e) {}
try {
BuildRevision revision = build.getRevisions().get(0);
logger.debug("revision: " + revision.getRevision());
logger.debug("revision dn: " + revision.getRevisionDisplayName());
} catch (Exception e) {}
try {
logger.debug("ftc: " + build.getShortStatistics().getFailedTestCount()); // 0
logger.debug("ptc: " + build.getShortStatistics().getPassedTestCount()); // 0
logger.debug("hanging: " + build.isProbablyHanging()); // false
} catch (Exception e) {}
try {
logger.debug("branch: " + build.getBranch());
} catch (Exception e) {}
try {
VcsRootInstanceEntry vcsRootEntries = build.getVcsRootEntries().get(0);
logger.debug("vcs root name: " + vcsRootEntries.getVcsName());
logger.debug("vcs root entries: " + vcsRootEntries.getDisplayName());
} catch (Exception e) {}
try {
List<BuildProblemData> reasons = build.getFailureReasons();
logger.debug("reasons: " + reasons.size());
for (BuildProblemData reason : reasons) {
logger.debug("reason: " + reason.getDescription());
}
} catch (Exception e) {}
List<BuildProblemData> reasons = build.getFailureReasons();
message = "FAILED: " + reasons.get(0).getDescription() + " (" +
reasons.size() + " reasons) " +
getRandomEmoticon(HipChatEmoticonSet.NEGATIVE);
message = "INTERRUPTED " + build.getCanceledInfo().getUserId() + " " + getRandomEmoticon(HipChatEmoticonSet.INDIFFERENT);