Add Bazel build for the cache-postgres module

Build the master and stable-2.14 branches. There is currently no
branch for stable-2.15.

Change-Id: I6010d2a2b54ee93e95b6dbcef1d3d407486f49cf
diff --git a/jenkins/gerrit-bazel-module-cache-postgres.yaml b/jenkins/gerrit-bazel-module-cache-postgres.yaml
new file mode 100644
index 0000000..47383dc
--- /dev/null
+++ b/jenkins/gerrit-bazel-module-cache-postgres.yaml
@@ -0,0 +1,6 @@
+- project:
+    name: cache-postgres
+    jobs:
+      - 'module-{name}-bazel-{branch}':
+          branch:
+            - stable-2.14
diff --git a/jenkins/gerrit-bazel-plugin-template.yaml b/jenkins/gerrit-bazel-plugin-template.yaml
index a13e56b..43f1171 100644
--- a/jenkins/gerrit-bazel-plugin-template.yaml
+++ b/jenkins/gerrit-bazel-plugin-template.yaml
@@ -70,3 +70,29 @@
       - archive:
          artifacts: >
            bazel-genfiles/plugins/{name}/*{name}*.jar*, bazel-genfiles/plugins/{name}/{name}.json
+
+- job-template:
+    name: 'module-{name}-bazel-{branch}'
+    class: modules
+    node: bazel-debian
+    description: "Lib module {name} {branch} branch Bazel build\n"
+    defaults: plugin-template-bazel
+    scm:
+      - git:
+         remotes:
+           - origin:
+               url: https://gerrit.googlesource.com/modules/{name}
+           - gerrit:
+               url: https://gerrit.googlesource.com/gerrit
+         branches:
+           - '*/{branch}'
+         skip-tag: true
+    builders:
+      - shell:
+         !include-raw: gerrit-bazel-build-plugin.sh
+      - shell:
+         !include-raw: gerrit-bazel-get-project-info.sh
+    publishers:
+      - archive:
+         artifacts: >
+           bazel-genfiles/plugins/{name}/*{name}*.jar*, bazel-genfiles/plugins/{name}/{name}.json