|
|
@ -152,7 +152,7 @@ var getStatusMessageFromRelease = function (app, options, callback) { |
|
|
|
if (!dirExists) { |
|
|
|
if (!dirExists) { |
|
|
|
return callback("Release directory not found. Probably repository hooks are not configured"); |
|
|
|
return callback("Release directory not found. Probably repository hooks are not configured"); |
|
|
|
} |
|
|
|
} |
|
|
|
if (options.attemptsGetReport > 10) { |
|
|
|
if (options.attemptsGetReport > 100) { |
|
|
|
return callback("Report file not found"); |
|
|
|
return callback("Report file not found"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -177,14 +177,14 @@ var getStatusMessageFromRelease = function (app, options, callback) { |
|
|
|
if (report.result === "MBSNotFound") { |
|
|
|
if (report.result === "MBSNotFound") { |
|
|
|
return callback("mbs.json is not found"); |
|
|
|
return callback("mbs.json is not found"); |
|
|
|
} |
|
|
|
} |
|
|
|
if ((report.result.errors.$allMessages || []).length + (report.result.warns.$allMessages || []).length > 0) { |
|
|
|
if (report.result && ((report.result.errors || {}).$allMessages || []).length + ((report.result.warns || {}).$allMessages || []).length > 0) { |
|
|
|
return callback(_.map( |
|
|
|
return callback(_.map( |
|
|
|
report.result.errors.$allMessages || [], function(message) { return "ERR: " + message.message } |
|
|
|
(report.result.errors || {}).$allMessages || [], function(message) { return "ERR: " + message.message } |
|
|
|
).concat(_.map( |
|
|
|
).concat(_.map( |
|
|
|
report.result.warns.$allMessages || [], function(message) { return "WARN: " + message.message } |
|
|
|
(report.result.warns || {}).$allMessages || [], function(message) { return "WARN: " + message.message } |
|
|
|
)).join("\r\n")); |
|
|
|
)).join("\r\n")); |
|
|
|
} |
|
|
|
} |
|
|
|
if (report.err) { |
|
|
|
if (!report.result || report.err) { |
|
|
|
return callback("CRITICAL ERROR: " + report.err); |
|
|
|
return callback("CRITICAL ERROR: " + report.err); |
|
|
|
} |
|
|
|
} |
|
|
|
if ((report.result.infos.$allMessages || []).length > 0) { |
|
|
|
if ((report.result.infos.$allMessages || []).length > 0) { |
|
|
|