Add gerrit-bsl-license extra gh repo to account plugin build

Change-Id: Id746346e939240458b994561f85cbf1d72f295c5
diff --git a/jenkins/gerrit-bazel-build-account-plugin.sh b/jenkins/gerrit-bazel-build-account-plugin.sh
index f833000..2491e8c 100644
--- a/jenkins/gerrit-bazel-build-account-plugin.sh
+++ b/jenkins/gerrit-bazel-build-account-plugin.sh
@@ -7,7 +7,29 @@
 rm -rf plugins/account
 git read-tree -u --prefix=plugins/account origin/{branch}
 
-for file in external_plugin_deps.bzl external_plugin_deps.MODULE.bazel external_package.json
+includeExternalBzlModDeps() {{
+  local pluginName=$1
+  if [ -f plugins/$pluginName/external_plugin_deps.MODULE.bazel ]
+  then
+    echo 'include("//plugins/'$pluginName':external_plugin_deps.MODULE.bazel")' >> plugins/external_plugin_deps.MODULE.bazel
+  fi
+}}
+
+includeExternalBzlModDeps account
+
+GH_PLUGIN_SCM_BASE_URL="https://review.gerrithub.io/{organization}"
+for extraGhRepo in {extra-gh-repos}
+do
+    pushd ..
+    git clone -b {branch} $GH_PLUGIN_SCM_BASE_URL/$extraGhRepo.git
+    popd
+    pushd plugins
+    ln -s ../../$extraGhRepo .
+    popd
+    includeExternalBzlModDeps $extraGhRepo
+done
+
+for file in external_plugin_deps.bzl external_package.json
 do
   if [ -f plugins/account/$file ]
   then
diff --git a/jenkins/gerrit-bazel-plugin-account.yaml b/jenkins/gerrit-bazel-plugin-account.yaml
index 4e128bc..faa75dd 100644
--- a/jenkins/gerrit-bazel-plugin-account.yaml
+++ b/jenkins/gerrit-bazel-plugin-account.yaml
@@ -88,7 +88,10 @@
     organization: GerritForge
     jobs:
       - 'plugin-account-gh-bazel-{branch}':
+          extra-gh-repos: 'gerrit-bsl-license'
           branch:
             - master
             - stable-3.14
+      - 'plugin-account-gh-bazel-{branch}':
+          branch:
             - stable-3.13