Merge "gerrit: Install zuul-summary-results plugin"

This commit is contained in:
Zuul 2021-01-19 05:29:58 +00:00 committed by Gerrit Code Review
commit 19ed7fd76d
5 changed files with 23 additions and 6 deletions

View File

@ -13,8 +13,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# This comment is here to be edited to force rebuilds. Please rebuild.
FROM docker.io/opendevorg/gerrit-base as gerrit FROM docker.io/opendevorg/gerrit-base as gerrit
COPY bazel-bin/release.war /var/gerrit/bin/gerrit.war COPY bazel-bin/release.war /var/gerrit/bin/gerrit.war
@ -24,3 +22,4 @@ RUN mkdir /var/gerrit/plugins && \
unzip -jo /var/gerrit/bin/gerrit.war WEB-INF/plugins/* -d /var/gerrit/plugins unzip -jo /var/gerrit/bin/gerrit.war WEB-INF/plugins/* -d /var/gerrit/plugins
COPY opendevtheme.html /var/gerrit/plugins/opendevtheme.html COPY opendevtheme.html /var/gerrit/plugins/opendevtheme.html
COPY bazel-bin/plugins/zuul-results-summary/zuul-results-summary.js /var/gerrit/plugins/zuul-results-summary.js

View File

@ -34,6 +34,7 @@
- reviewnotes - reviewnotes
- singleusergroup - singleusergroup
- webhooks - webhooks
- zuul-results-summary
# Some submodules don't have appropriate refs to checkout for specific # Some submodules don't have appropriate refs to checkout for specific
# gerrit branches. We address that by checking them out explicitly in # gerrit branches. We address that by checking them out explicitly in

View File

@ -6,11 +6,17 @@
# Disable the x/ redirection since we have x/ projects # Disable the x/ redirection since we have x/ projects
sed -i -e 's|"/x/\*"\,$|//"/x/*",|g' java/com/google/gerrit/httpd/raw/StaticModule.java sed -i -e 's|"/x/\*"\,$|//"/x/*",|g' java/com/google/gerrit/httpd/raw/StaticModule.java
- name: Run bazelisk build - name: Build gerrit
include_role: include_role:
name: bazelisk-build name: bazelisk-build
vars: vars:
zuul_work_dir: /home/zuul/src/gerrit.googlesource.com/gerrit zuul_work_dir: /home/zuul/src/gerrit.googlesource.com/gerrit
# NOTE(ianw): There doesn't seem to be a way to integrate
# polygerrit/javascript plugins into the standard "release"
# target; we add plugins as separate targets here
bazelisk_targets:
- release
- plugins/zuul-results-summary:zuul-results-summary
# Bazel makes "convenience symlinks" [1] starting with bazel-* to # Bazel makes "convenience symlinks" [1] starting with bazel-* to
# the actual build output. The problem is that we want to use the # the actual build output. The problem is that we want to use the

View File

@ -26,7 +26,6 @@ def test_gerrit_listening(host):
gerrit_web = host.socket("tcp://:::8081") gerrit_web = host.socket("tcp://:::8081")
assert gerrit_web.is_listening assert gerrit_web.is_listening
def test_gerrit_screenshot(host): def test_gerrit_screenshot(host):
driver = webdriver.Remote( driver = webdriver.Remote(
command_executor='http://%s:4444/wd/hub' % (host.backend.get_hostname()), command_executor='http://%s:4444/wd/hub' % (host.backend.get_hostname()),
@ -39,8 +38,16 @@ def test_gerrit_screenshot(host):
driver.save_screenshot("/var/log/screenshots/gerrit-main-page.png") driver.save_screenshot("/var/log/screenshots/gerrit-main-page.png")
driver.get("http://localhost:8081/c/test-project/+/1") driver.get("http://localhost:8081/c/test-project/+/1")
WebDriverWait(driver, 30).until(lambda driver: driver.execute_script( time.sleep(5)
'return document.readyState') == 'complete') driver.execute_script(
"document.querySelector('gr-app').shadowRoot"
".querySelector('gr-app-element').shadowRoot"
".querySelector('main')"
".querySelector('gr-change-view').shadowRoot"
".querySelector('paper-tab[data-name=\"change-view-tab-header-zuul-results-summary\"]')"
".click()"
)
time.sleep(5)
driver.save_screenshot("/var/log/screenshots/gerrit-change-page.png") driver.save_screenshot("/var/log/screenshots/gerrit-change-page.png")
except TimeoutException as e: except TimeoutException as e:
raise e raise e

View File

@ -83,6 +83,8 @@
override-checkout: v3.2.3 override-checkout: v3.2.3
- name: gerrit.googlesource.com/plugins/webhooks - name: gerrit.googlesource.com/plugins/webhooks
override-checkout: v3.2.3 override-checkout: v3.2.3
- name: gerrit.googlesource.com/plugins/zuul-results-summary
override-checkout: main
# Non plugin submodules # Non plugin submodules
- name: gerrit.googlesource.com/jgit - name: gerrit.googlesource.com/jgit
override-checkout: master override-checkout: master
@ -156,6 +158,8 @@
- gerrit.googlesource.com/plugins/reviewnotes - gerrit.googlesource.com/plugins/reviewnotes
- gerrit.googlesource.com/plugins/singleusergroup - gerrit.googlesource.com/plugins/singleusergroup
- gerrit.googlesource.com/plugins/webhooks - gerrit.googlesource.com/plugins/webhooks
- name: gerrit.googlesource.com/plugins/zuul-results-summary
override-checkout: main
- gerrit.googlesource.com/polymer-bridges - gerrit.googlesource.com/polymer-bridges
vars: &gerrit_vars_master vars: &gerrit_vars_master
zuul_work_dir: src/opendev.org/opendev/system-config zuul_work_dir: src/opendev.org/opendev/system-config