-
Notifications
You must be signed in to change notification settings - Fork 84
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
chore: track customization in templates #1876
Conversation
Kokoro CI error:
|
Changed test directory and only lint failed:
|
synthtool/gcp/templates/java_library/.kokoro/nightly/integration.cfg
Outdated
Show resolved
Hide resolved
tests/fixtures/java_templates/partials_test/.integration-partials.yaml
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think about the possibility of not needing partial_files arguments to java_library and _load_generic_metadata. If you still feel it's better to let users to explicitly specify the partial files, then I'm good. Approving either case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally, looks ok to me
Append env_vars in all kokoro build configuration files (*.cfg in .kokoro/) which contain an
env_vars
(key: JOB_TYPE, value: integration)When you want to append the environment variable too all templated .cfg which has an env_vars (key: JOB_TYPE, value: integration), follow the steps below:
Note that the file extension should be
.yaml
.Modify default env_vars in Kokoro build templates
You don’t need to modify existing env_vars defined in the templates because if there are multiple env_vars with the same key, the last value will be used.
Please refer to Maps in proto 3 language guide.
Example
Append env_vars in configuration files with an env_vars (key: JOB_TYPE, value: integration)
.integration-partials.yaml
to the repository root..integration-partials.yaml
, add the following section:After the change
The following section will be appended to
.kokoro/nightly/integration.cfg
.kokoro/nightly/java11-integration.cfg
.kokoro/presubmit/integration.cfg
Because these files contain env_vars (key: JOB_TYPE, value: integration)
For env_var entry with key GCLOUD_PROJECT, the default value is overwritten by customized value (gcloud-devel) that appears later in the file.
Fix #1798.