Do not test ReviewDb on master

When commits are landing to master, do not check anymore
for ReviewDb scenarios because it is not validated anymore
on the changes targeting master and thus is not guaranteed
to be working.

Change-Id: I1ad9bd6ea025095beb669940653f211430db3bdd
diff --git a/jenkins/gerrit-bazel-test.sh b/jenkins/gerrit-bazel-test.sh
index 4f6f337..9bc43ab 100755
--- a/jenkins/gerrit-bazel-test.sh
+++ b/jenkins/gerrit-bazel-test.sh
@@ -10,9 +10,12 @@
                    --test_timeout 3600 \
                    --test_tag_filters=-flaky,-docker"
 
-echo 'Test in ReviewDb mode'
-echo '----------------------------------------------'
-bazel test --test_env=GERRIT_NOTEDB=OFF $BAZEL_OPTS //...
+if [ "{branch}" == "stable-2.16" ] || [ "{branch}" == "stable-2.15" ] || [ "{branch}" == "stable-2.14" ]
+then
+  echo 'Test in ReviewDb mode'
+  echo '----------------------------------------------'
+  bazel test --test_env=GERRIT_NOTEDB=OFF $BAZEL_OPTS //...
+fi
 
 if [ "{branch}" == "master" ] || [ "{branch}" == "stable-2.16" ] || [ "{branch}" == "stable-2.15" ]
 then