Disable polygerrit tests on stable-2.13

Tests fail on this release due to a bug that was fixed in 2.14.
Also polygerrit is experimental on 2.13 so tests are more likely to fail.

Keep running tests on 2.14 as the test passes and we backport fixes
there for polygerrit.

Change-Id: Ie7c39b44cef954e4308eb033e41a77406a19a822
diff --git a/jenkins/gerrit-bazel-test.sh b/jenkins/gerrit-bazel-test.sh
index 5f45c58..a990389 100755
--- a/jenkins/gerrit-bazel-test.sh
+++ b/jenkins/gerrit-bazel-test.sh
@@ -25,17 +25,20 @@
   bazel test --test_env=GERRIT_NOTEDB=FUSED $BAZEL_OPTS //...
 fi
 
-echo 'Test PolyGerrit locally'
-echo '----------------------------------------------'
-bash ./polygerrit-ui/app/run_test.sh || touch ~/polygerrit-failed
-
-if [ -z "$SAUCE_USERNAME" ] || [ -z "$SAUCE_ACCESS_KEY" ]
+if [ "{branch}" == "master" || "{branch}" == "stable-2.14" ]
 then
-  echo 'Not running on Sauce Labs because env vars are not set.'
-else
-  echo 'Test PolyGerrit on Sauce Labs'
+  echo 'Test PolyGerrit locally'
   echo '----------------------------------------------'
-  WCT_ARGS='--plugin sauce' bash ./polygerrit-ui/app/run_test.sh || touch ~/polygerrit-failed
+  bash ./polygerrit-ui/app/run_test.sh || touch ~/polygerrit-failed
+
+  if [ -z "$SAUCE_USERNAME" ] || [ -z "$SAUCE_ACCESS_KEY" ]
+  then
+    echo 'Not running on Sauce Labs because env vars are not set.'
+  else
+    echo 'Test PolyGerrit on Sauce Labs'
+    echo '----------------------------------------------'
+    WCT_ARGS='--plugin sauce' bash ./polygerrit-ui/app/run_test.sh || touch ~/polygerrit-failed
+  fi
 fi
 
 exit 0
diff --git a/jenkins/gerrit-bazel-verifier-test.sh b/jenkins/gerrit-bazel-verifier-test.sh
index 8fb5ddf..4c7a651 100755
--- a/jenkins/gerrit-bazel-verifier-test.sh
+++ b/jenkins/gerrit-bazel-verifier-test.sh
@@ -32,26 +32,29 @@
   bazel test $GERRIT_NOTEDB $BAZEL_OPTS //...
 fi
 
-if [[ "$MODE" == *"polygerrit"* ]]
+if [[ "$TARGET_BRANCH" == "master" || "$TARGET_BRANCH" == "stable-2.14" ]]
 then
-  if [[ "$TARGET_BRANCH" == "master" ]]
+  if [[ "$MODE" == *"polygerrit"* ]]
   then
-    echo 'Running lint tests...'
-    bazel test //polygerrit-ui/app:lint_test --test_output errors
-  fi
+    if [[ "$TARGET_BRANCH" == "master" ]]
+    then
+      echo 'Running lint tests...'
+      bazel test //polygerrit-ui/app:lint_test --test_output errors
+    fi
 
-  if [ -z "$DISPLAY" ]
-  then
-    echo 'Not running local tests because env var "DISPLAY" is not set.'
-  else
-    echo 'Running local tests...'
-    bash ./polygerrit-ui/app/run_test.sh || touch ~/polygerrit-failed
-  fi
-  if [ -z "$SAUCE_USERNAME" ] || [ -z "$SAUCE_ACCESS_KEY" ]
-  then
-    echo 'Not running on Sauce Labs because env vars are not set.'
-  else
-    echo 'Running tests on Sauce Labs...'
-    WCT_ARGS='--plugin sauce' bash ./polygerrit-ui/app/run_test.sh || touch ~/polygerrit-failed
+    if [ -z "$DISPLAY" ]
+    then
+      echo 'Not running local tests because env var "DISPLAY" is not set.'
+    else
+      echo 'Running local tests...'
+      bash ./polygerrit-ui/app/run_test.sh || touch ~/polygerrit-failed
+    fi
+    if [ -z "$SAUCE_USERNAME" ] || [ -z "$SAUCE_ACCESS_KEY" ]
+    then
+      echo 'Not running on Sauce Labs because env vars are not set.'
+    else
+      echo 'Running tests on Sauce Labs...'
+      WCT_ARGS='--plugin sauce' bash ./polygerrit-ui/app/run_test.sh || touch ~/polygerrit-failed
+    fi
   fi
 fi