Copy package.json to plugins/package.json in CI

* Copy’s package.json to plugins/package.json as we
  need to include the dep in the output js/build.

* Removes polymer-bridge as a dev dep, as when we copy
  package.json to plugins/package.json, the path to
  polymer-bridge doesn’t work. It’s only used in the tests.
  And even then the tests are broken as they haven’t been adapted.
  We don’t use bower anymore. And this isn’t used in
  production either.

Change-Id: I40d5ad7e04b52ddf1d3a9b616eb6cd35bfe1a66a
diff --git a/.zuul.yaml b/.zuul.yaml
index d21fdc6..7004a0c 100644
--- a/.zuul.yaml
+++ b/.zuul.yaml
@@ -5,6 +5,7 @@
       bazelisk_artifacts:
         - "bazel-bin/plugins/{{ gerrit_plugin }}/{{ gerrit_plugin }}.js"
       bazelisk_test_targets: ""
+    pre-run: playbooks/setup-package.yaml
 
 - project:
     description: |
@@ -12,3 +13,9 @@
     check:
       jobs:
         - plugins-image-diff-build
+    post:
+      jobs:
+        - plugins-image-diff-build
+        - gerrit-plugin-publish:
+            dependencies:
+              - plugins-image-diff-build
diff --git a/package.json b/package.json
index 790065b..1d001ad 100644
--- a/package.json
+++ b/package.json
@@ -19,8 +19,7 @@
         "eslint-config-google": "^0.13.0",
         "eslint-plugin-html": "^6.0.0",
         "eslint-plugin-import": "^2.20.1",
-        "eslint-plugin-jsdoc": "^19.2.0",
-        "polymer-bridges": "file:../../polymer-bridges/"
+        "eslint-plugin-jsdoc": "^19.2.0"
     },
     "license": "Apache-2.0",
     "private": true
diff --git a/playbooks/setup-package.yaml b/playbooks/setup-package.yaml
new file mode 100644
index 0000000..cb20107
--- /dev/null
+++ b/playbooks/setup-package.yaml
@@ -0,0 +1,7 @@
+- hosts: all
+  tasks:
+    - name: symlink
+      command: "cp -f plugins/image-diff/package.json plugins/package.json"
+      args:
+        executable: /bin/bash
+        chdir: '{{ ansible_user_dir }}/{{ zuul.projects["gerrit.googlesource.com/gerrit"].src_dir }}'