commit | 9b2de0265c1dc78cb5410d4565065b61f87bd014 | [log] [tgz] |
---|---|---|
author | Quinten Yearsley <qyearsley@chromium.org> | Fri Feb 08 18:56:27 2019 |
committer | Quinten Yearsley <qyearsley@chromium.org> | Fri Feb 08 18:56:27 2019 |
tree | 1844dc94f0938da46e181d0d1739976ed1ad84fe | |
parent | b960cecf692f2b40952293de78229995cd5e2fb8 [diff] |
[tricium plugin] Copy reworking of auth from buildbucket plugin This CL includes: - copying over auth.js, auth_test.html, promises.js, test-util.js - changing client code so it's in a class, not polymer element - adding call to initAuth - updating tricium-view and tricium-feedback-button - removing unused loggedIn property from tricium-view - updating tests - removing example.html which doesn't work anymore and which didn't show how the elements really looked anyway I tested this by: - Running the WCT unit tests - Running run-with-prod-data.sh and verifying that tricium-view could fetch Progress from Tricium. NOTE: Eventually, if we move auth.js etc. to a separate plugin in orderly to reuse the code, this should make it easier to transition to using that plugin. This change should resolve crbug.com/923301 by removing use of this.$.client. Bug: 923301 Change-Id: I24c3e8251b90e9a6f2f2bde5ece5e498e1e8bdf5 Reviewed-on: https://chromium-review.googlesource.com/c/1446147 Reviewed-by: Nodir Turakulov <nodir@chromium.org>
Tricium is a code analysis service for Chromium. The purpose of this plugin is to integrate with the Gerrit UI, e.g. by displaying progress of analyzers.
To check out the Tricium plugin code:
git clone https://chromium.googlesource.com/infra/gerrit-plugins/tricium
The unit tests of the plugin are web-component-tester unit tests. Dependencies are specified in bower.json and can be installed by running bower install
in this directory. This requires bower to be installed.
To run the tests, run wct
from this directory. See wct --help
for more options.
With a local static web server, such as the one provided by Polymer CLI, you can also view and tweak UI interactively.
To install the Polymer tool-set globally, run npm install -g polymer-cli
.
You can create a local instance of Gerrit and use this plugin in that instance.
If needed, install bazel, and then build from the Gerrit repo root with bazel build plugins/tricium
.
The Gerrit repo includes a script for trying the PolyGerrit UI with a local server local plugins but with production data. See run-with-prod-data.sh.
To set up to run PolyGerrit with a local copy of the plugin, first get the Gerrit repo:
git clone --recursive https://gerrit.googlesource.com/gerrit
Then move or link the Tricium repo so it's inside the gerrit/plugins/
directory, e.g. mv tricium gerrit/plugins/
.
Known issue: with a locally run PolyGerrit, you can‘t log in, which means robot comment actions (e.g. the “not useful” button) aren’t visible by default.
It's also possible to test with a local instance of Gerrit.
To do this you must set up a Gerrit test site. To build the tricium plugin in Gerrit, it is assumed that the tricium directory is iniside the gerrit plugins directory.
Then, the local site could be started with Tricium by running run-with-testsite.sh.
This plugin is configured via the tricium.config
file present in the repo's refs/meta/config
ref. This file uses git config format. Example:
[host] tricium = tricium-prod.appspot.com