Use per-project settings for Zuul v3 support

In Zuul v3, the whole API is split by the tenant name; there is no
possibility to request status of a change without knowing the tenant
name.

This patch adapts Tricium's code for per-project setting retrieval. The
top-level global variable in site-path/etc/gerrit.config is no longer
used. Given that this is a fresh plugin, I think it's safe to make that
change now without any extra compatibility code. The value can be set
just as easily in All-Project's refs/meta/config.

It was also necessary to remove that extra JSON Content-Type header.
Without that, Firefox would complain about Access-Control-Allow-Headers
not allowing the `content-type`. It seems that there's no need to send
these headers in the first place.

The curret version is able to show the status dashboard for the ucurrent
job in both Zuul v2 and Zuul v3. In v2, links point to individual job's
logs. For v3, they go to a not-that-useful page with job description.
That will be fixed later.

I also plan to expand this a bit for Zuul v3 because it supports
querying build results even after all jobs have concluded. I hope to
offer a nice and simple but persistent indication of job results so that
one could configure PolyGerrit to hide bot's comments by default, only
relying on the zuul-status' output as a result matrix. That's future
work, though.

Change-Id: I93b4d6fcd7c312ddc543bff42522c82be77d7a76
4 files changed
tree: 9d497edad29ed8cdf9bd29b9596c910dc2e7065d
  1. src/
  2. .gitignore
  3. BUILD
  4. LICENSE