test: Fix docker-tests for in-tree/master When running the docker tests against master we need to depend on the in-tree WAR so that the runtime APIs match what we compiled against. In order to depend on the WAR we need to add the polymer-bridges project (core submodule) as a required project so that the core build is successful. This also requires us to remove all other plugins from the 3.9 docker image to avoid any incompatibilities they may have with master. As a result of this change, the bazel test docker-tests target now only works with an in-tree build on the master branch. This is an unfortunate difference compared to the stable branches, but it makes sense given that we need a Gerrit WAR with compatible runtime APIs running in the container. Change-Id: I533fa8faff49c1439348780199fdad43bad47b07
diff --git a/.zuul.yaml b/.zuul.yaml index 8a8e161..00f109c 100644 --- a/.zuul.yaml +++ b/.zuul.yaml
@@ -3,6 +3,8 @@ parent: gerrit-plugin-build pre-run: tools/playbooks/install_docker.yaml + required-projects: + - polymer-bridges - project: check:
diff --git a/BUILD b/BUILD index 717467e..9560696 100644 --- a/BUILD +++ b/BUILD
@@ -108,10 +108,16 @@ size = "medium", srcs = ["test/docker/run.sh"], args = [ - "--plugin", plugin_name, + "--gerrit-war", + "$(location //:gerrit.war)", + "--plugin", + plugin_name, "$(location :depends-on)", ], - data = [plugin_name] + glob(["test/**"]), + data = [ + "//:gerrit.war", + plugin_name, + ] + glob(["test/**"]), local = True, tags = ["docker"], )