Have jenkins update wait for queued builds, unable to catch pending though.
This commit is contained in:
parent
bfb496141e
commit
5a05dffdce
@ -88,6 +88,22 @@ public class LDJenkins {
|
|||||||
for (Map map : (List<Map>) lastBuild.get("builds")) {
|
for (Map map : (List<Map>) lastBuild.get("builds")) {
|
||||||
String result = (String) map.get("result");
|
String result = (String) map.get("result");
|
||||||
|
|
||||||
|
if (result == null || result.equalsIgnoreCase("null")) {
|
||||||
|
if (version == null) {
|
||||||
|
DisguiseUtilities.getLogger()
|
||||||
|
.info("Jenkins build is pending.. Sleeping and checking again in 10 seconds");
|
||||||
|
|
||||||
|
try {
|
||||||
|
Thread.sleep(10000);
|
||||||
|
}
|
||||||
|
catch (InterruptedException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
return getLatestSnapshot();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Object items = ((Map) map.get("changeSet")).get("items");
|
Object items = ((Map) map.get("changeSet")).get("items");
|
||||||
boolean release = false;
|
boolean release = false;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user