Set salt test pipeline status to ABORTED in case of skip these tests

Change-Id: I053a2ea6ebcaa3e496445c15ad7b882afdde3dc3
diff --git a/test-salt-formulas-pipeline.groovy b/test-salt-formulas-pipeline.groovy
index 25e6f58..c1b5e7c 100644
--- a/test-salt-formulas-pipeline.groovy
+++ b/test-salt-formulas-pipeline.groovy
@@ -44,10 +44,12 @@
         def gerritChange = gerrit.getGerritChange(GERRIT_NAME, GERRIT_HOST, GERRIT_CHANGE_NUMBER, CREDENTIALS_ID, true)
         // test if gerrit change is already Verified
         if(gerrit.patchsetHasApproval(gerritChange.currentPatchSet,"Verified","+")){
-          common.successMsg("Gerrit change ${GERRIT_CHANGE_NUMBER} patchset ${GERRIT_PATCHSET_NUMBER} already has Verified, skipping tests") // do nothing
+          common.successMsg("Gerrit change ${GERRIT_CHANGE_NUMBER} patchset ${GERRIT_PATCHSET_NUMBER} already has Verified, skipping tests")
+          currentBuild.result = 'ABORTED'
         // test WIP contains in commit message
         }else if(gerritChange.commitMessage.contains("WIP")){
-          common.successMsg("Commit message contains WIP, skipping tests") // do nothing
+          common.successMsg("Commit message contains WIP, skipping tests")
+          currentBuild.result = 'ABORTED'
         }else{
           // test if change aren't already merged
           def merged = gerritChange.status == "MERGED"
@@ -57,6 +59,7 @@
             ])
           } else{
             common.successMsg("Change ${GERRIT_CHANGE_NUMBER} is already merged, no need to test them")
+            currentBuild.result = 'ABORTED'
           }
         }
       } else if(defaultGitRef && defaultGitUrl) {
diff --git a/test-salt-models-pipeline.groovy b/test-salt-models-pipeline.groovy
index de6a612..96ef843 100644
--- a/test-salt-models-pipeline.groovy
+++ b/test-salt-models-pipeline.groovy
@@ -47,10 +47,12 @@
         def gerritChange = gerrit.getGerritChange(GERRIT_NAME, GERRIT_HOST, GERRIT_CHANGE_NUMBER, CREDENTIALS_ID, true)
         // test if gerrit change is already Verified
         if(gerrit.patchsetHasApproval(gerritChange.currentPatchSet,"Verified", "+")){
-          common.successMsg("Gerrit change ${GERRIT_CHANGE_NUMBER} patchset ${GERRIT_PATCHSET_NUMBER} already has Verified, skipping tests") // do nothing
+          common.successMsg("Gerrit change ${GERRIT_CHANGE_NUMBER} patchset ${GERRIT_PATCHSET_NUMBER} already has Verified, skipping tests")
+          currentBuild.result = 'ABORTED'
         // test WIP contains in commit message
         }else if (gerritChange.commitMessage.contains("WIP")) {
-          common.successMsg("Commit message contains WIP, skipping tests") // do nothing
+          common.successMsg("Commit message contains WIP, skipping tests")
+          currentBuild.result = 'ABORTED'
         } else {
           def merged = gerritChange.status == "MERGED"
           if(!merged){
@@ -59,6 +61,7 @@
             ])
           } else{
             common.successMsg("Change ${GERRIT_CHANGE_NUMBER} is already merged, no need to test them")
+            currentBuild.result = 'ABORTED'
           }
         }
       } else if(defaultGitRef && defaultGitUrl) {