Ensure plugins directory is clean when building Docker image

Different recipes might download different plugins which are then used
to build a Gerrit docker image for that specific deployment type.

Ensure that the 'plugins' directory is wiped out before running "docker
build" for Gerrit so that only the relevant jars are added to the image
rather than jars that might have been previously downloaded by other
recipes.

Bug: Issue 13293
Change-Id: Idd385f687ddbed6179f80b193290a96b4d808dc4
diff --git a/gerrit/Makefile b/gerrit/Makefile
index 9b05b1f..026e31f 100644
--- a/gerrit/Makefile
+++ b/gerrit/Makefile
@@ -9,6 +9,9 @@
 	# Make sure Prometheus Metrics exporter plugin is installed
 	mkdir -p $(@D)/plugins
 
+	@echo "Ensure no plugins are left from previous deployments"
+	rm -f $(@D)/plugins/*.jar
+
 	@echo "Downloading metrics-reporter-prometheus plugin $(GERRIT_BRANCH)"
 	wget $(GERRIT_CI)/plugin-metrics-reporter-prometheus-bazel-master-$(GERRIT_BRANCH)/$(LAST_BUILD)/metrics-reporter-prometheus/metrics-reporter-prometheus.jar \
 	-O ./plugins/metrics-reporter-prometheus.jar \