Skip to content

Commit a1cf5d3

Browse files
committed
fix sdk-platform-java install scripts
1 parent 2ceee93 commit a1cf5d3

File tree

1 file changed

+66
-58
lines changed

1 file changed

+66
-58
lines changed

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

Lines changed: 66 additions & 58 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,30 @@ 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
106111
working-directory: sdk-platform-java
107112
- 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
113+
- name: Install all modules using Java 11
114+
shell: bash
115+
run: .kokoro/build.sh
116+
env:
117+
BUILD_SUBDIR: sdk-platform-java
118+
JOB_TYPE: install
112119
- name: Integration Tests
113120
run: |
114121
bazelisk --batch test //sdk-platform-java/test/integration/...
@@ -127,26 +134,30 @@ jobs:
127134
cache: maven
128135
- run: java -version
129136
- 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
137+
shell: bash
138+
run: .kokoro/build.sh
139+
env:
140+
BUILD_SUBDIR: sdk-platform-java
141+
JOB_TYPE: test
134142
# The `envVarTest` profile runs tests that require an environment variable
135143
- 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
144+
shell: bash
145+
run: .kokoro/build.sh
140146
env:
147+
BUILD_SUBDIR: sdk-platform-java
148+
JOB_TYPE: test
149+
SUREFIRE_JVM_OPT: '-PenvVarTest'
141150
GOOGLE_CLOUD_UNIVERSE_DOMAIN: random.com
142151
GOOGLE_CLOUD_ENABLE_DIRECT_PATH_XDS: true
143152
GOOGLE_SDK_JAVA_LOGGING: true
144153
working-directory: sdk-platform-java
145154
- 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
155+
- name: Install all modules using Java 11
156+
shell: bash
157+
run: .kokoro/build.sh
158+
env:
159+
BUILD_SUBDIR: sdk-platform-java
160+
JOB_TYPE: install
150161
- name: Integration Tests
151162
# note need to set shouldInstallTestSecurityManager=false due to https://github.com/bazelbuild/bazel/issues/24354
152163
run: |
@@ -215,9 +226,10 @@ jobs:
215226
cache: maven
216227
- name: Install all modules using Java 11
217228
shell: bash
218-
run: |
219-
mvn -V -B -ntp clean install -DskipTests -Dfmt.skip -Dcheckstyle.skip
220-
working-directory: sdk-platform-java
229+
run: .kokoro/build.sh
230+
env:
231+
BUILD_SUBDIR: sdk-platform-java
232+
JOB_TYPE: install
221233
- uses: actions/setup-java@v3
222234
with:
223235
java-version: 8
@@ -265,9 +277,10 @@ jobs:
265277
cache: maven
266278
- name: Install all modules using Java 11
267279
shell: bash
268-
run: |
269-
mvn install -B -ntp -DskipTests -Dclirr.skip -Dcheckstyle.skip -Dfmt.skip
270-
working-directory: sdk-platform-java
280+
run: .kokoro/build.sh
281+
env:
282+
BUILD_SUBDIR: sdk-platform-java
283+
JOB_TYPE: install
271284
- uses: actions/setup-java@v3
272285
with:
273286
java-version: 8
@@ -339,9 +352,11 @@ jobs:
339352
distribution: temurin
340353
- run: mvn -version
341354
- name: Install Maven modules
342-
run: |
343-
mvn install -B -ntp -DskipTests -Dclirr.skip -Dcheckstyle.skip -Dfmt.skip
344-
working-directory: sdk-platform-java
355+
shell: bash
356+
run: .kokoro/build.sh
357+
env:
358+
BUILD_SUBDIR: sdk-platform-java
359+
JOB_TYPE: test
345360
- name: Showcase golden tests
346361
working-directory: sdk-platform-java/java-showcase
347362
run: |
@@ -418,9 +433,11 @@ jobs:
418433
distribution: temurin
419434
cache: maven
420435
- name: Install Maven modules
421-
run: |
422-
mvn install -B -ntp -DskipTests -Dclirr.skip -Dcheckstyle.skip -Dfmt.skip
423-
working-directory: sdk-platform-java
436+
shell: bash
437+
run: .kokoro/build.sh
438+
env:
439+
BUILD_SUBDIR: sdk-platform-java
440+
JOB_TYPE: install
424441
- name: Install showcase to local maven repository
425442
run: |
426443
mvn install -B -ntp -T 1C -DskipTests
@@ -454,20 +471,11 @@ jobs:
454471
distribution: temurin
455472
cache: maven
456473
- 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
474+
shell: bash
475+
run: .kokoro/build.sh
476+
env:
477+
BUILD_SUBDIR: sdk-platform-java
478+
JOB_TYPE: test
471479
- name: Validate gapic-generator-java-bom
472480
uses: googleapis/java-cloud-bom/tests/validate-bom@47ad868794c5d38ee7eb95d69371a7a79f84d890
473481
with:

0 commit comments

Comments
 (0)