Change method for removing plural s

- Add plural_namespaces list, that contains plural
  form of namespaces, because "oss" namespace, for
  example is not a plural form

Change-Id: I087c1a614766265a5595914391719260e7217804
diff --git a/gating-pipeline.groovy b/gating-pipeline.groovy
index c056f38..89ac78f 100644
--- a/gating-pipeline.groovy
+++ b/gating-pipeline.groovy
@@ -20,8 +20,9 @@
           def gerritProjectArray = GERRIT_PROJECT.tokenize("/")
           def gerritProject = gerritProjectArray[gerritProjectArray.size() - 1]
           def jobsNamespace = JOBS_NAMESPACE
+          def plural_namespaces = ['salt-formulas', 'salt-models']
           // remove plural s on the end of job namespace
-          if (JOBS_NAMESPACE[JOBS_NAMESPACE.length() - 1].equals("s")){
+          if (JOBS_NAMESPACE in plural_namespaces){
             jobsNamespace = JOBS_NAMESPACE.substring(0, JOBS_NAMESPACE.length() - 1)
           }
           def testJob = String.format("test-%s-%s", jobsNamespace, gerritProject)
@@ -57,4 +58,4 @@
 @NonCPS
 def _jobExists(jobName){
   return Jenkins.instance.items.find{it -> it.name.equals(jobName)}
-}
\ No newline at end of file
+}