diff --git a/test-salt-models-pipeline.groovy b/test-salt-models-pipeline.groovy
index 0058ef3..de4110d 100644
--- a/test-salt-models-pipeline.groovy
+++ b/test-salt-models-pipeline.groovy
@@ -3,12 +3,31 @@
 def ssh = new com.mirantis.mk.Ssh()
 def git = new com.mirantis.mk.Git()
 
+def gerritRef
+try {
+  gerritRef = GERRIT_REFSPEC
+} catch (MissingPropertyException e) {
+  gerritRef = null
+}
+
+try {
+    systemGitRef = RECLAS_SYSTEM_GIT_REF
+    systemGitUrl = RECLAS_SYSTEM_GIT_URL
+} catch (MissingPropertyException e) {
+    systemGitRef = null
+    systemGitUrl = null
+}
+
 node("python") {
   try{
     stage("checkout") {
-      gerrit.gerritPatchsetCheckout ([
+      if (gerritRef) {
+        gerrit.gerritPatchsetCheckout ([
           credentialsId : CREDENTIALS_ID
-      ])
+        ])
+      } else {
+        git.checkoutGitRepository('.', GIT_URL, "master", CREDENTIALS_ID)
+      }
 
       if (fileExists('classes/system')) {
         ssh.prepareSshAgentKey(CREDENTIALS_ID)
@@ -17,6 +36,14 @@
           ssh.ensureKnownHosts(remoteUrl)
         }
         ssh.agentSh("git submodule init; git submodule sync; git submodule update --recursive")
+
+        if (systemGitRef) {
+          common.infoMsg("Fetching alternate system reclass (${systemGitUrl} ${systemGitRef})")
+          dir('classes/system') {
+            ssh.ensureKnownHosts(RECLASS_SYSTEM_GIT_URL)
+            ssh.agentSh("git fetch ${systemGitUrl} ${systemGitRef} && git checkout FETCH_HEAD")
+          }
+        }
       }
     }
     stage("test") {
