Add gerrit build test jobs

Add several test jobs which build each supported branch of the
Gerrit repo to verify that they all work (since the Gerrit repo
itself is not running Zuul jobs yet).

Reparent gerrit-build and gerrit-build-plugin on gerrit-base,
now that it exists (it is defined by the dependent changes
below).  That job adds jgit to the branches which require it.

Depends-On: https://gerrit-review.googlesource.com/257073
Depends-On: https://gerrit-review.googlesource.com/257075
Depends-On: https://gerrit-review.googlesource.com/257076
Depends-On: https://gerrit-review.googlesource.com/257077
Change-Id: I4fd75dd043d5f883081920ce878e8686ff77e0d6
diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml
index dde5e53..66c1404 100644
--- a/zuul.d/jobs.yaml
+++ b/zuul.d/jobs.yaml
@@ -15,7 +15,7 @@
 
 - job:
     name: gerrit-build-base
-    parent: gerrit-setup
+    parent: gerrit-base
     description: |
       Build Gerrit
 
@@ -41,7 +41,7 @@
 
 - job:
     name: gerrit-plugin-build
-    parent: gerrit-setup
+    parent: gerrit-base
     description: |
       Builds a Gerrit plugin in-tree
 
@@ -66,6 +66,3 @@
       gerrit_plugin: "{{ zuul.project.short_name }}"
       bazelisk_targets: "plugins/{{ gerrit_plugin }}:{{ gerrit_plugin }}"
       zuul_work_dir: "{{ ansible_user_dir }}/src/gerrit.googlesource.com/gerrit"
-    # Temporarily add jgit here until we reparent on gerrit-base
-    required-projects:
-      - jgit
diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml
index ce9587a..91877b2 100644
--- a/zuul.d/project.yaml
+++ b/zuul.d/project.yaml
@@ -6,3 +6,7 @@
         - test-gerrit-setup
         - test-install-build-essential
         - test-gerrit-plugin-build
+        - test-gerrit-build-master
+        - test-gerrit-build-stable-3.1
+        - test-gerrit-build-stable-3.0
+        - test-gerrit-build-stable-2.16
diff --git a/zuul.d/test-jobs.yaml b/zuul.d/test-jobs.yaml
index fa0a196..300ec52 100644
--- a/zuul.d/test-jobs.yaml
+++ b/zuul.d/test-jobs.yaml
@@ -58,3 +58,22 @@
       - roles/prepare-gerrit-repos/.*
       - roles/copy-plugin-deps/.*
       - playbooks/gerrit-plugin/build.yaml
+
+- job:
+    name: test-gerrit-build-master
+    parent: gerrit-build
+
+- job:
+    name: test-gerrit-build-stable-3.1
+    parent: gerrit-build
+    override-checkout: stable-3.1
+
+- job:
+    name: test-gerrit-build-stable-3.0
+    parent: gerrit-build
+    override-checkout: stable-3.0
+
+- job:
+    name: test-gerrit-build-stable-2.16
+    parent: gerrit-build
+    override-checkout: stable-2.16