|
71 | 71 |
|
72 | 72 | Building the Java Plugin
|
73 | 73 | * have a gerrit checkout and clone the plugin to plugins/gerrit-plugin-qt-workflow (we should add it as submodule when it's done)
|
74 |
| - * run "bazel build plugins/gerrit-plugin-qt-workflow" |
| 74 | + * run "bazelisk build plugins/gerrit-plugin-qt-workflow" |
75 | 75 | * the binary will be "bazel-genfiles/plugins/gerrit-plugin-qt-workflow/gerrit-plugin-qt-workflow.jar"
|
76 | 76 |
|
77 | 77 | Building Gerrit
|
78 |
| - * run "bazel build release" |
| 78 | + * run "bazelisk build release" |
79 | 79 | * copy binary file to the gerrit site directory: "cp bazel-bin/release.war thedir/bin/gerrit.war"
|
80 | 80 |
|
81 | 81 | Working with the local development environment
|
82 |
| - * Setup database |
83 |
| - https://codereview.qt-project.org/Documentation/install.html#createdb |
84 | 82 | * Init test site
|
85 | 83 | https://gerrit-review.googlesource.com/Documentation/dev-readme.html#init
|
86 | 84 | * Set access righs for test projects:
|
|
98 | 96 | ssh -p 29418 admin@localhost gerrit-plugin-qt-workflow staging-approve --branch master --build-id b001 --project JustTest --result pass
|
99 | 97 | ssh -p 29418 admin@localhost gerrit stream-events
|
100 | 98 | ssh -p 29418 admin@localhost gerrit index changes 17 26 27 28
|
101 |
| - * useful Git commands |
102 |
| - git pull --recurse-submodules |
103 |
| - git clone ssh://admin@localhost:29418/arepo.git |
104 |
| - git push origin HEAD:refs/for/master |
| 99 | + * Fetching staging and builds refs to work area. |
105 | 100 | git fetch -f origin refs/staging/*:refs/staging/*
|
106 | 101 | git fetch -f origin refs/builds/*:refs/builds/*
|
107 |
| - git fetch origin |
108 |
| - git reset --hard origin/master |
109 | 102 | * Running tests:
|
110 |
| - bazel test --test_output=streamed //plugins/gerrit-plugin-qt-workflow:* |
| 103 | + bazelisk test --test_output=streamed //plugins/gerrit-plugin-qt-workflow:* |
| 104 | + * Running a single test, for example: |
| 105 | + bazelisk test --test_output=streamed //plugins/gerrit-plugin-qt-workflow:qtcodereview_tests --test_filter=singleChange_Defer_QtAbandon |
111 | 106 | * Test coverage:
|
112 | 107 | install genhtml tool, for example: brew install lcov
|
113 |
| - run: bazel coverage //plugins/gerrit-plugin-qt-workflow:* |
114 |
| - cd plugins/gerrit-plugin-qt-workflow |
115 |
| - ./tools/coverage.sh thecoveragefile.dat |
116 |
| - => html report available at ./coverage/index.html |
| 108 | + run: bazelisk coverage //plugins/gerrit-plugin-qt-workflow:* |
| 109 | + genhtml -o ./coveragedir --ignore-errors source thegeneratedcoveragefile.dat |
| 110 | + => html report available at ./coveragedir/index.html |
117 | 111 |
|
118 | 112 | ## Installation
|
119 | 113 |
|
|
125 | 119 | rebuild with the patches. The plan is to upstream these changes.
|
126 | 120 |
|
127 | 121 | Access rights:
|
128 |
| - * FIXME: Stage/Unstage requires push permission to refs/staging/* branch - we should instead have an explicit staging right |
129 | 122 | * Defer/Reopen requires same permissions as abandon
|
130 | 123 | * CI needs the permission to created references (refs/builds/*), push to branches (refs/heads/*) and
|
131 | 124 | force push to staging refs (refs/staging/*)
|
132 | 125 |
|
133 | 126 | Copy static files into the site dir: cp gerrit-plugin-qt-workflow/static/* gerritsitedir/static/
|
134 |
| - |
135 |
| -## Open Items |
136 |
| - |
137 |
| - * Events are needed for staged, integrating and deferred status changes |
138 |
| - * There is currently no rights management for when to show the staging button |
139 |
| - * In testing the staging branch was not created automatically |
140 |
| - * Are email notifications needed for deferred, reopened status changes? |
141 |
| - * automated tests for UI? |
0 commit comments