Fix codenarc issues to unblock merge
Change-Id: I14f30b0780627249bd908ebc09ea2a79ac9a92c4
(cherry picked from commit 49d6781485955465138b7b40194df2a1ae2297f8)
diff --git a/src/com/mirantis/mk/Common.groovy b/src/com/mirantis/mk/Common.groovy
index 1b7b4fc..a4b9637 100644
--- a/src/com/mirantis/mk/Common.groovy
+++ b/src/com/mirantis/mk/Common.groovy
@@ -828,8 +828,8 @@
input message: getColorizedString("We are going to execute stage \'${currentStage}\' on the following target ${target}.\nPlease review stage information above.", "yellow")
}
try {
- return body.call()
stageMap[currentStage]['Status'] = "SUCCESS"
+ return body.call()
} catch (Exception err) {
def msg = "Stage ${currentStage} failed with the following exception:\n${err}"
print getColorizedString(msg, "yellow")
diff --git a/src/com/mirantis/mk/Salt.groovy b/src/com/mirantis/mk/Salt.groovy
index 93750ae..9020f82 100644
--- a/src/com/mirantis/mk/Salt.groovy
+++ b/src/com/mirantis/mk/Salt.groovy
@@ -894,8 +894,9 @@
def resKey;
if(node instanceof Map){
resKey = node.keySet()[k]
- if (resKey == "retcode")
+ if (resKey == "retcode") {
continue
+ }
}else if(node instanceof List){
resKey = k
}