You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6bf8e1a
Browse filesBrowse the repository at this point in the historyBrowse files
perf(ci): replace mvn help:evaluate with native bash and sed extraction
In Kokoro CI and automation scripts, heavy Maven JVM invocations were used to parse POM values:
- In generate_modified_modules_list (.kokoro/common.sh), evaluating
project.modules launched a full JVM and evaluated the monorepo POMs,
taking 20–30+ seconds on every single CI run.
- In downstream-build.sh (.kokoro/presubmit/downstream-build.sh) and
showcase-native.sh (sdk-platform-java/.kokoro/presubmit/showcase-native.sh),
evaluating gapic-showcase.version launched Maven JVM processes.
- In update_javadoc.sh (google-auth-library-java/scripts/update_javadoc.sh),
maven-help-plugin:evaluate was called to obtain the project version.
Optimizations:
- Pure-Bash Module Extraction: Updated generate_modified_modules_list to use
extract_pom_modules pom.xml, extracting all 270 modules in ~0.02s without JVM
boot overhead.
- Sed Showcase Version Extraction: Updated downstream-build.sh and showcase-native.sh
to parse <gapic-showcase.version> directly using sed with fail-fast validation,
and added --fail to curl.
- Sed Javadoc Version Extraction: Updated update_javadoc.sh to parse project version
from pom.xml using sed, skipping parent POM declarations.
- Unit Tests: Added automated unit tests in .kokoro/common_test.sh for
extract_pom_modules and generate_modified_modules_list.
- Refactoring & Best Practices: Scoped temporary variables as local, used pure-bash
whitespace trimming and string manipulations, and anchored paths.
0 commit comments