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
# limitations under the License.
# This comment is here to be edited to force rebuilds. Please rebuild.
FROM docker.io/opendevorg/gerrit-base as gerrit
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
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
- singleusergroup
- webhooks
- zuul-results-summary
# Some submodules don't have appropriate refs to checkout for specific
# 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
sed -i -e 's|"/x/\*"\,$|//"/x/*",|g' java/com/google/gerrit/httpd/raw/StaticModule.java
- name: Run bazelisk build
- name: Build gerrit
include_role:
name: bazelisk-build
vars:
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
# 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")
assert gerrit_web.is_listening
def test_gerrit_screenshot(host):
driver = webdriver.Remote(
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.get("http://localhost:8081/c/test-project/+/1")
WebDriverWait(driver, 30).until(lambda driver: driver.execute_script(
'return document.readyState') == 'complete')
time.sleep(5)
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")
except TimeoutException as e:
raise e

View File

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