Fix its-* builds on stable branches

When building any its-* plugin, take the more Gerrit-specific
its-base plugin version.

Change-Id: Ibcbb07bb066df305060747ca7c35bea6fa4bd7dc
diff --git a/jenkins/gerrit-bazel-build-its-plugin-branch.sh b/jenkins/gerrit-bazel-build-its-plugin-branch.sh
index dbda42e..b39eb5b 100644
--- a/jenkins/gerrit-bazel-build-its-plugin-branch.sh
+++ b/jenkins/gerrit-bazel-build-its-plugin-branch.sh
@@ -6,7 +6,9 @@
 rm -rf plugins/its-{name}
 rm -rf plugins/its-base
 git read-tree -u --prefix=plugins/its-{name} origin/{branch}
-git read-tree -u --prefix=plugins/its-base base/{branch}
+
+# Try first the Gerrit-specific branch of its-base and then fallback to the one of the plugin
+git read-tree -u --prefix=plugins/its-base base/{gerrit-branch} || git read-tree -u --prefix=plugins/its-base base/{branch}
 
 rm -Rf bazel-genfiles