Skip to content

Commit d42155e

Browse files
committed
chore: ensure we use the current version of the auth library in the monorepo
current versions fix double annotation fix sdk-platform-java install scripts declare individual auth library versions auth library is required build fix downstream tests cleanup downstream tests fix common test fix path to downstream script fix setup maven mirror fix unmanaged dependency check fix showcase tests build: fix jar location fix jar location skip auth-library tests for bulk tests fix tests fix sdk-platform-java dependency compatibility unit test fix image version remove dep versions for common packages in storage fix compatibility check
1 parent ca9edb9 commit d42155e

File tree

25 files changed

+252
-173
lines changed

25 files changed

+252
-173
lines changed

.github/workflows/sdk-platform-java-ci.yaml

Lines changed: 77 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@ jobs:
3333
cache: maven
3434
- run: java -version
3535
- name: Unit Tests
36-
run: |
37-
mvn test --batch-mode --no-transfer-progress -Dcheckstyle.skip \
38-
-Dfmt.skip -DenableTestCoverage
39-
working-directory: sdk-platform-java
36+
shell: bash
37+
run: .kokoro/build.sh
38+
env:
39+
BUILD_SUBDIR: sdk-platform-java
40+
JOB_TYPE: test
4041
# The `envVarTest` profile runs tests that require an environment variable
4142
- name: Env Var Tests
4243
run: |
@@ -49,10 +50,12 @@ jobs:
4950
GOOGLE_SDK_JAVA_LOGGING: true
5051
working-directory: sdk-platform-java
5152
- run: bazelisk version
52-
- name: Install Maven modules
53-
run: |
54-
mvn install -B -ntp -DskipTests -Dclirr.skip -Dcheckstyle.skip -Dfmt.skip
55-
working-directory: sdk-platform-java
53+
- name: Install all modules using Java 11
54+
shell: bash
55+
run: .kokoro/build.sh
56+
env:
57+
BUILD_SUBDIR: sdk-platform-java
58+
JOB_TYPE: install
5659
- name: Integration Tests
5760
run: |
5861
bazelisk --batch test //sdk-platform-java/test/integration/...
@@ -89,26 +92,29 @@ jobs:
8992
cache: maven
9093
- run: java -version
9194
- name: Unit Tests
92-
run: |
93-
mvn test --batch-mode --no-transfer-progress -Dcheckstyle.skip \
94-
-Dfmt.skip -DenableTestCoverage
95-
working-directory: sdk-platform-java
95+
shell: bash
96+
run: .kokoro/build.sh
97+
env:
98+
BUILD_SUBDIR: sdk-platform-java
99+
JOB_TYPE: test
96100
# The `envVarTest` profile runs tests that require an environment variable
97101
- name: Env Var Tests
98-
run: |
99-
mvn test --batch-mode --no-transfer-progress -Dcheckstyle.skip \
100-
-Dfmt.skip -DenableTestCoverage -PenvVarTest
101-
# Set the Env Var for this step only
102+
shell: bash
103+
run: .kokoro/build.sh
102104
env:
105+
BUILD_SUBDIR: sdk-platform-java
106+
JOB_TYPE: test
107+
SUREFIRE_JVM_OPT: '-PenvVarTest'
103108
GOOGLE_CLOUD_UNIVERSE_DOMAIN: random.com
104109
GOOGLE_CLOUD_ENABLE_DIRECT_PATH_XDS: true
105110
GOOGLE_SDK_JAVA_LOGGING: true
106-
working-directory: sdk-platform-java
107111
- run: bazelisk version
108-
- name: Install Maven modules
109-
run: |
110-
mvn install -B -ntp -DskipTests -Dclirr.skip -Dcheckstyle.skip
111-
working-directory: sdk-platform-java
112+
- name: Install all modules using Java 11
113+
shell: bash
114+
run: .kokoro/build.sh
115+
env:
116+
BUILD_SUBDIR: sdk-platform-java
117+
JOB_TYPE: install
112118
- name: Integration Tests
113119
run: |
114120
bazelisk --batch test //sdk-platform-java/test/integration/...
@@ -127,26 +133,29 @@ jobs:
127133
cache: maven
128134
- run: java -version
129135
- name: Unit Tests
130-
run: |
131-
mvn test --batch-mode --no-transfer-progress -Dcheckstyle.skip \
132-
-Dfmt.skip -DenableTestCoverage
133-
working-directory: sdk-platform-java
136+
shell: bash
137+
run: .kokoro/build.sh
138+
env:
139+
BUILD_SUBDIR: sdk-platform-java
140+
JOB_TYPE: test
134141
# The `envVarTest` profile runs tests that require an environment variable
135142
- name: Env Var Tests
136-
run: |
137-
mvn test --batch-mode --no-transfer-progress -Dcheckstyle.skip \
138-
-Dfmt.skip -DenableTestCoverage -PenvVarTest
139-
# Set the Env Var for this step only
143+
shell: bash
144+
run: .kokoro/build.sh
140145
env:
146+
BUILD_SUBDIR: sdk-platform-java
147+
JOB_TYPE: test
148+
SUREFIRE_JVM_OPT: '-PenvVarTest'
141149
GOOGLE_CLOUD_UNIVERSE_DOMAIN: random.com
142150
GOOGLE_CLOUD_ENABLE_DIRECT_PATH_XDS: true
143151
GOOGLE_SDK_JAVA_LOGGING: true
144-
working-directory: sdk-platform-java
145152
- run: bazelisk version
146-
- name: Install Maven modules
147-
run: |
148-
mvn install -B -ntp -DskipTests -Dclirr.skip -Dcheckstyle.skip -Dfmt.skip
149-
working-directory: sdk-platform-java
153+
- name: Install all modules using Java 11
154+
shell: bash
155+
run: .kokoro/build.sh
156+
env:
157+
BUILD_SUBDIR: sdk-platform-java
158+
JOB_TYPE: install
150159
- name: Integration Tests
151160
# note need to set shouldInstallTestSecurityManager=false due to https://github.com/bazelbuild/bazel/issues/24354
152161
run: |
@@ -164,12 +173,17 @@ jobs:
164173
java-version: 8
165174
distribution: temurin
166175
cache: maven
176+
- name: Compile with Java 17 and run tests with Java 8
177+
shell: bash
178+
run: .kokoro/build.sh
179+
env:
180+
BUILD_SUBDIR: sdk-platform-java
181+
JOB_TYPE: install
167182
- run: echo "JAVA8_HOME=${JAVA_HOME}" >> $GITHUB_ENV
168183
- uses: actions/setup-java@v3
169184
with:
170185
java-version: 17
171186
distribution: temurin
172-
- name: Compile with Java 17 and run tests with Java 8
173187
shell: bash
174188
run: |
175189
set -x
@@ -215,9 +229,10 @@ jobs:
215229
cache: maven
216230
- name: Install all modules using Java 11
217231
shell: bash
218-
run: |
219-
mvn -V -B -ntp clean install -DskipTests -Dfmt.skip -Dcheckstyle.skip
220-
working-directory: sdk-platform-java
232+
run: .kokoro/build.sh
233+
env:
234+
BUILD_SUBDIR: sdk-platform-java
235+
JOB_TYPE: install
221236
- uses: actions/setup-java@v3
222237
with:
223238
java-version: 8
@@ -265,9 +280,10 @@ jobs:
265280
cache: maven
266281
- name: Install all modules using Java 11
267282
shell: bash
268-
run: |
269-
mvn install -B -ntp -DskipTests -Dclirr.skip -Dcheckstyle.skip -Dfmt.skip
270-
working-directory: sdk-platform-java
283+
run: .kokoro/build.sh
284+
env:
285+
BUILD_SUBDIR: sdk-platform-java
286+
JOB_TYPE: install
271287
- uses: actions/setup-java@v3
272288
with:
273289
java-version: 8
@@ -339,9 +355,11 @@ jobs:
339355
distribution: temurin
340356
- run: mvn -version
341357
- name: Install Maven modules
342-
run: |
343-
mvn install -B -ntp -DskipTests -Dclirr.skip -Dcheckstyle.skip -Dfmt.skip
344-
working-directory: sdk-platform-java
358+
shell: bash
359+
run: .kokoro/build.sh
360+
env:
361+
BUILD_SUBDIR: sdk-platform-java
362+
JOB_TYPE: test
345363
- name: Showcase golden tests
346364
working-directory: sdk-platform-java/java-showcase
347365
run: |
@@ -418,9 +436,11 @@ jobs:
418436
distribution: temurin
419437
cache: maven
420438
- name: Install Maven modules
421-
run: |
422-
mvn install -B -ntp -DskipTests -Dclirr.skip -Dcheckstyle.skip -Dfmt.skip
423-
working-directory: sdk-platform-java
439+
shell: bash
440+
run: .kokoro/build.sh
441+
env:
442+
BUILD_SUBDIR: sdk-platform-java
443+
JOB_TYPE: install
424444
- name: Install showcase to local maven repository
425445
run: |
426446
mvn install -B -ntp -T 1C -DskipTests
@@ -454,20 +474,11 @@ jobs:
454474
distribution: temurin
455475
cache: maven
456476
- name: Install Maven modules to local Maven repository
457-
run: |
458-
mvn install \
459-
-B -ntp \
460-
-Dorg.slf4j.simpleLogger.showDateTime=true \
461-
-Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss:SSS \
462-
-DskipTests \
463-
-Dclirr.skip=true \
464-
-Denforcer.skip=true \
465-
-Dcheckstyle.skip=true \
466-
-Dflatten.skip=true \
467-
-Danimal.sniffer.skip=true \
468-
-Dmaven.wagon.http.retryHandler.count=5 \
469-
-T 1C
470-
working-directory: sdk-platform-java
477+
shell: bash
478+
run: .kokoro/build.sh
479+
env:
480+
BUILD_SUBDIR: sdk-platform-java
481+
JOB_TYPE: install
471482
- name: Validate gapic-generator-java-bom
472483
uses: googleapis/java-cloud-bom/tests/validate-bom@47ad868794c5d38ee7eb95d69371a7a79f84d890
473484
with:
@@ -491,9 +502,11 @@ jobs:
491502
mvn test --batch-mode --no-transfer-progress
492503
working-directory: sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check
493504
- name: Install Maven modules
494-
run: |
495-
mvn install -B -ntp -DskipTests -Dclirr.skip -Dcheckstyle.skip -Dfmt.skip
496-
working-directory: sdk-platform-java
505+
shell: bash
506+
run: .kokoro/build.sh
507+
env:
508+
BUILD_SUBDIR: sdk-platform-java
509+
JOB_TYPE: test
497510
- name: Unmanaged dependency check
498511
uses: ./sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check
499512
with:

.github/workflows/sdk-platform-java-dependency_compatibility_test.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@ jobs:
5050
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.dependencies-list != '' }}
5151
run: echo "DEPENDENCIES_LIST=${{ github.event.inputs.dependencies-list }}" >> $GITHUB_ENV
5252

53+
- name: Install sdk-platform-java modules
54+
shell: bash
55+
run: .kokoro/build.sh
56+
env:
57+
BUILD_SUBDIR: sdk-platform-java
58+
JOB_TYPE: install
59+
5360
# Run in the root module which should test for everything except for showcase
5461
- name: Perform Dependency Compatibility Unit Testing
5562
shell: bash
@@ -61,12 +68,6 @@ jobs:
6168
fi
6269
working-directory: sdk-platform-java
6370

64-
# Install the modules for showcase (Shared-Deps is required to run showcase)
65-
- name: Install sdk-platform-java's modules
66-
# gapic-generator-java requires Java 8 and is irrelevant for this CI
67-
run: mvn -q -B -ntp install --projects '!gapic-generator-java' -Dcheckstyle.skip -Dfmt.skip -DskipTests -Dclirr.skip -T 1C
68-
working-directory: sdk-platform-java
69-
7071
# Set up local showcase server to run the showcase ITs
7172
- name: Parse showcase version
7273
working-directory: sdk-platform-java/java-showcase/gapic-showcase

.github/workflows/sdk-platform-java-downstream.yaml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,9 @@ jobs:
3232
matrix:
3333
repo:
3434
- java-bigtable
35-
- java-bigquery
3635
- java-firestore
3736
- java-pubsub
3837
- java-pubsublite
39-
- java-spanner-jdbc
40-
- java-spanner
41-
- java-storage
42-
- java-storage-nio
4338
steps:
4439
- uses: actions/checkout@v3
4540
- uses: actions/setup-java@v3
@@ -52,9 +47,9 @@ jobs:
5247
sudo apt-get update
5348
sudo apt-get -y install libxml2-utils
5449
- name: Test helper scripts
55-
run: ./sdk-platform-java/.kokoro/presubmit/common_test.sh
50+
run: .kokoro/common_test.sh
5651
- name: Perform downstream compatibility testing
57-
run: REPOS_UNDER_TEST="${{ matrix.repo }}" ./sdk-platform-java/.kokoro/presubmit/downstream-compatibility.sh
52+
run: REPOS_UNDER_TEST="${{ matrix.repo }}" .kokoro/downstream-compatibility.sh
5853
downstream-compatibility-spring-generator:
5954
needs: filter
6055
if: ${{ needs.filter.outputs.library == 'true' }}
@@ -73,4 +68,4 @@ jobs:
7368
sudo apt-get update
7469
sudo apt-get -y install libxml2-utils
7570
- name: Perform downstream compatibility testing
76-
run: ./sdk-platform-java/.kokoro/presubmit/downstream-compatibility-spring.sh
71+
run: .kokoro/downstream-compatibility-spring.sh

.github/workflows/sdk-platform-java-java_compatibility_check.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,11 @@ jobs:
4343
distribution: temurin
4444
cache: maven
4545
- name: Install sdk-platform-modules to local Maven repository
46-
run: |
47-
mvn install -B -ntp -T 1C -DskipTests -Dclirr.skip -Dcheckstyle.skip -Denforcer.skip
48-
working-directory: sdk-platform-java
46+
shell: bash
47+
run: .kokoro/build.sh
48+
env:
49+
BUILD_SUBDIR: sdk-platform-java
50+
JOB_TYPE: install
4951
- name: Check Java 8 compatibility for class files
5052
shell: bash
5153
run: |

0 commit comments

Comments
 (0)