The check_output method is only available from Python 2.7, so a wrapper
method was introduced for compatibility with 2.6.
The ZipFile class does not include context manager support in Python
2.6, so the file download code was written to explicitly open and close
the zip files.
Since Buck itself now requires at least Python 2.7, these workarounds
are no longer necessary. Remove them.
Also, tidy up a few minor PEP-8 coding style violations in the modified
files.
Change-Id: I9a1b25ddf7494e25ccadeaed0c1d85cd1ce2fd09
Since the last Buck upgraded this morning with [1]
the root path resolution is broken.
This is due to the different expansion of the __file__
macro into a deeper structure, including the python
relative path name inside a PEX directory structure.
Example:
gerrit/buck-out/bin/tools/maven/mvn.pex/gerrit-extension-api/pom.xml
In order to go back to the root package structure
and locate the pom.xml file correctly, we need now
to go back until the .buckconfig file is found
(instead of going back exactly 3 times as it was before).
P.S. Without this change the targets api_install
and war_install are broken on master.
Change-Id: I1a99606ad304c245b21ba501f15c473142a89fc2
Switch deploying Gerrit extension and plugin API from Google storage
bucket to Maven Central.
To simplify the troubleshooting new trace option was added to
underlying python script. When environment variable VERBOSE=1
is set, then the mvn command is printed to stderr:
VERBOSE=1 buck build api_deploy_oss
Change-Id: I9ebe44ec8aca91aa6b5514f561209e7c50377927
I22c8d3339 added unconditionally installation of gerrit.war to API install
process. Because it depends on '//:release' target all core plugins,
documentation and optimized permutations of all supported GWT client
agents must be built to update a new version of plugin API.
In some cases it cannot be built at all, i.e. if Gerrit tree was cloned
non-recursively, and core plugins are not available.
Very repetitive tasks in development process like building new version of
plugin API that other plugins depend on should be very easy and fast doable.
Decouple installation and deployment of gerrit.war in its own targets:
$ buck build war_{install,deploy}
Change-Id: I7fce3b126621580dde43104aa811d704cf6e8997
This patch adds gerrit.war into api_{install,deploy} buck build step.
This allows third party maven based builds depend on gerrit.war
artifact.
Change-Id: I22c8d3339a1647913967e423e45462c2c5c255de
Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
* stable-2.8:
Update 2.8.2 release notes with recently merged changes
Update change to invalidate cache after deletion of draft revision
Buck: Decouple plugin-api installation from deployment
SideBySide2: Fill the browser width
SideBySide2: Fix tab alignment to be correct width
Extend ChangeScreen2 horizontal bars to full width.
Conflicts:
gerrit-gwtui/src/main/java/com/google/gerrit/client/change/ChangeScreen2.ui.xml
gerrit-gwtui/src/main/java/com/google/gerrit/client/diff/DiffTable.ui.xml
Change-Id: Ie78dbe4f7c6695be273a78e4fe44a2d4081aed7e
Currently the same pom_fake.xml controls both installing the plugin-api
in local Maven repository (typical use case for a contributor) and
deploying it on Google bucket (typical use case for a maintainer). To fit
the both use cases that file contains stuff needed for uploading to Google
bucket only: 'gs-maven-wagon' artifact and the repository to fetch it from.
Because the "best" build tool in the world randomly and unreproducible
fails to fetch that artifact [1], frustrating the potential contributors,
for reasons that nobody knows and understands, separate these use cases
from each other, and strip the stuff from pom_fake.xml needed for deployment
of plugin-api. The cost is code duplication. The advantage of doing it:
buck build api_install
just works. Always.
[1] https://gist.github.com/mulby/092fee5f5962aafbbb25#file-gerrit-build-error-txt
Change-Id: I842335907ef8721f4126bcd90e395f7748aefc74
Currently the same pom_fake.xml controls both installing the plugin-api
in local Maven repository (typical use case for a contributor) and
deploying it on Google bucket (typical use case for a maintainer). To fit
the both use cases that file contains stuff needed for uploading to Google
bucket only: 'gs-maven-wagon' artifact and the repository to fetch it from.
Because the "best" build tool in the world randomly and unreproducible
fails to fetch that artifact [1], frustrating the potential contributors,
for reasons that nobody knows and understands, separate these use cases
from each other, and strip the stuff from pom_fake.xml needed for deployment
of plugin-api. The cost is code duplication. The advantage of doing it:
buck build api_install
just works. Always.
[1] https://gist.github.com/mulby/092fee5f5962aafbbb25#file-gerrit-build-error-txt
Change-Id: I842335907ef8721f4126bcd90e395f7748aefc74
This plugin module was left out during Buck migration.
$>buck build api
produces now plugin-gwtui.jar and plugin-gwtui-src.jar.
Buck Maven bridge was enhanced to {install|deploy} the new artifact to
remote or local Maven repositories:
$>buck build install_api
deployes
gerrit-plugin-gwtui-2.9-SNAPSHOT-sources.jar
gerrit-plugin-gwtui-2.9-SNAPSHOT.jar
to local Maven repository.
Change-Id: Idae18f6df2e67fe53d57b8c35caa4226333e269b
(cherry picked from commit c8cffc8e928a9277621ffff6cb740f79cd662195)
Add the necessary settings in the fake pom.xml file, and correct the URL
in the BUCK file to make deployment with gs-maven-wagon work.
Change-Id: I6d1f84c850c70f731d061d9e50a062d37c68baf2
Since this Buck's commit 59759043f66de17140b423a7f11a2d8827b4cbbf the whole
unflattened subtree is used.
Change-Id: I4ec930a452d4867add3f5dd46430d3184c2a7277
buck build api
generates now javadocs.
buck build api_install
installs all plugin/extension related artifacts with javadocs in the
local Maven repository.
Change-Id: Ifa6a8eb469f388e16449576ff2bff01a5dce67dd
This plugin module was left out during Buck migration.
$>buck build api
produces now plugin-gwtui.jar and plugin-gwtui-src.jar.
Buck Maven bridge was enhanced to {install|deploy} the new artifact to
remote or local Maven repositories:
$>buck build install_api
deployes
gerrit-plugin-gwtui-2.9-SNAPSHOT-sources.jar
gerrit-plugin-gwtui-2.9-SNAPSHOT.jar
to local Maven repository.
Change-Id: Idae18f6df2e67fe53d57b8c35caa4226333e269b
genrule() no longer supports running commands run only for the
side-effect with no output file. Actions like download_sources or
eclipse need to be handled using Python scripts executed from the
user's shell, otherwise Buck fails if caching is enabled.
Change-Id: I361fc20675f211e15e4ab7942ef52778d0a615c2
The correct reference to the action name is args.a. action is an old
variable that was replaced by args.a and this reference was missed.
Bug: issue 2086
Change-Id: Ibfbf523db8a8adfbf72f31de3ddc7b0ec96014eb
Rewrite the Maven tool to accept a spec of things to process on the
command line and use $(location) in the invoking genrule() to locate
the necessary files from Buck. This gets rid of special cases in the
mvn wrapper tool and allows the definition to be given completely from
Buck as part of the build description.
Maven needs to be single threaded to perform repository updates safely
so only one genrule() target is declared to buck for the deploy or
install action. The rule is given all artifact information in a single
pass, allowing the mvn.py wrapper to execute them.
Change-Id: Idbcf645b69280420987a0e8f52947ba93ac9e6f0