Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a nom_build wrapper script #508

Merged
merged 1 commit into from Mar 10, 2020
Merged

Create a nom_build wrapper script #508

merged 1 commit into from Mar 10, 2020

Conversation

@mindhog
Copy link
Member

mindhog commented Mar 9, 2020

nom_build is a wrapper around ./gradlew. It's purpose is to help us
deal with properties. The main problem that it is trying to solve is
that when properties are specified using -P, we don't get an error if
the property we specify isn't correct. As a result, a user or a build
agent can launch a build with unintended parameters.

nom_build consolidates all of the properties that we define into a
python script where the properties are translated to flags (actual
gradlew flags are also proxied). It also generates the property file
and warns the user if the current properties file is out of sync with
the script and includes documentation on each of the properties.


This change is Reviewable

nom_build is a wrapper around ./gradlew.  It's purpose is to help us
deal with properties.  The main problem that it is trying to solve is
that when properties are specified using -P, we don't get an error if
the property we specify isn't correct.  As a result, a user or a build
agent can launch a build with unintended parameters.

nom_build consolidates all of the properties that we define into a
python script where the properties are translated to flags (actual
gradlew flags are also proxied).  It also generates the property file
and warns the user if the current properties file is out of sync with
the script and includes documentation on each of the properties.
@googlebot googlebot added the cla: yes label Mar 9, 2020
@mindhog mindhog requested a review from weiminyu Mar 9, 2020
Copy link
Collaborator

weiminyu left a comment

Reviewable status: 0 of 4 files reviewed, 2 unresolved discussions (waiting on @mindhog and @weiminyu)


config/nom_build.py, line 273 at r1 (raw file):

parser.add_argument('--generate-gradle-properties',

Does this command always regenerate the properties file? It could be annoying if, say, I alternate between maven central and gcs for mavenUrl.


config/nom_build_test.py, line 44 at r1 (raw file):

class MyTest(unittest.TestCase):

How is this test invoked? Do we need a Graadle plugin for Python?

Copy link
Member Author

mindhog left a comment

Reviewable status: 0 of 4 files reviewed, 2 unresolved discussions (waiting on @weiminyu)


config/nom_build.py, line 273 at r1 (raw file):

Previously, weiminyu (Weimin Yu) wrote…
parser.add_argument('--generate-gradle-properties',

Does this command always regenerate the properties file? It could be annoying if, say, I alternate between maven central and gcs for mavenUrl.

You need to add this flag explicitly to regenerate the properties file. If the file is different from what we expect, the tool will give a warning but will allow you to proceed.


config/nom_build_test.py, line 44 at r1 (raw file):

Previously, weiminyu (Weimin Yu) wrote…

How is this test invoked? Do we need a Graadle plugin for Python?

It is currently invoked by hand: python3 config/nom_build_test.py
but yes, we need a follow-up PR to add it to the test suite.

Copy link
Collaborator

weiminyu left a comment

Reviewed 2 of 4 files at r1.
Reviewable status: 2 of 4 files reviewed, 1 unresolved discussion (waiting on @weiminyu)

@mindhog mindhog merged commit 6e12312 into google:master Mar 10, 2020
6 of 7 checks passed
6 of 7 checks passed
code-review/reviewable 2 files, 1 discussion left (weiminyu)
Details
LGTM analysis: Java No code changes detected
Details
LGTM analysis: JavaScript No code changes detected
Details
LGTM analysis: Python No new or fixed alerts
Details
cla/google All necessary CLAs are signed
kokoro-foss Kokoro build finished
Details
kokoro-internal Kokoro build finished
Details
@mindhog mindhog deleted the mindhog:build-script branch Mar 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.