Skip to content

Commit 513da0a

Browse files
committed
fix pipelines
1 parent d178c84 commit 513da0a

10 files changed

Lines changed: 177 additions & 16 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ jobs:
3636
with:
3737
filters: |
3838
src:
39-
- '!(google-auth-library-java|grpc-gcp-java|java-bigquery|java-bigquerystorage|java-bigtable|java-datastore|java-firestore|java-logging|java-logging-logback|java-pubsub|java-spanner|java-storage)/**/*.java'
40-
- '!(google-auth-library-java|grpc-gcp-java|java-bigquery|java-bigquerystorage|java-bigtable|java-datastore|java-firestore|java-logging|java-logging-logback|java-pubsub|java-spanner|java-storage)/**/pom.xml'
39+
- '!(google-auth-library-java|grpc-gcp-java|java-bigquery|java-bigquery-jdbc|java-bigquerystorage|java-bigtable|java-datastore|java-firestore|java-logging|java-logging-logback|java-pubsub|java-spanner|java-storage)/**/*.java'
40+
- '!(google-auth-library-java|grpc-gcp-java|java-bigquery|java-bigquery-jdbc|java-bigquerystorage|java-bigtable|java-datastore|java-firestore|java-logging|java-logging-logback|java-pubsub|java-spanner|java-storage)/**/pom.xml'
4141
- 'pom.xml'
4242
ci:
4343
- '.github/workflows/ci.yaml'
Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
# Copyright 2026 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
# Github action job to test core java library features on
15+
# downstream client libraries before they are released.
16+
on:
17+
push:
18+
branches:
19+
- main
20+
pull_request:
21+
name: java-bigquery-jdbc ci
22+
env:
23+
BUILD_SUBDIR: java-bigquery-jdbc
24+
jobs:
25+
filter:
26+
runs-on: ubuntu-latest
27+
outputs:
28+
library: ${{ steps.filter.outputs.library }}
29+
steps:
30+
- uses: actions/checkout@v4
31+
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
32+
id: filter
33+
with:
34+
filters: |
35+
library:
36+
- 'java-bigquery-jdbc/**'
37+
- '.github/workflows/java-bigquery-jdbc-ci.yaml'
38+
- 'google-auth-library-java/**/*.java'
39+
- 'google-auth-library-java/**/pom.xml'
40+
- 'sdk-platform-java/**/*.java'
41+
- 'sdk-platform-java/java-shared-dependencies/**/pom.xml'
42+
- 'sdk-platform-java/gapic-generator-java-pom-parent/pom.xml'
43+
units:
44+
needs: filter
45+
if: ${{ needs.filter.outputs.library == 'true' }}
46+
runs-on: ubuntu-latest
47+
strategy:
48+
fail-fast: false
49+
matrix:
50+
java: [11, 17, 21, 25]
51+
steps:
52+
- uses: actions/checkout@v4
53+
- uses: actions/setup-java@v4
54+
with:
55+
distribution: temurin
56+
java-version: ${{matrix.java}}
57+
- run: java -version
58+
- run: .kokoro/build.sh
59+
env:
60+
JOB_TYPE: test
61+
units-java8:
62+
needs: filter
63+
if: ${{ needs.filter.outputs.library == 'true' }}
64+
# Building using Java 17 and run the tests with Java 8 runtime
65+
name: "units (8)"
66+
runs-on: ubuntu-latest
67+
steps:
68+
- uses: actions/checkout@v4
69+
- uses: actions/setup-java@v4
70+
with:
71+
java-version: 8
72+
distribution: temurin
73+
- name: "Set jvm system property environment variable for surefire plugin (unit tests)"
74+
# Maven surefire plugin (unit tests) allows us to specify JVM to run the tests.
75+
# https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#jvm
76+
run: echo "SUREFIRE_JVM_OPT=-Djvm=${JAVA_HOME}/bin/java -P !java17" >> $GITHUB_ENV
77+
shell: bash
78+
- uses: actions/setup-java@v4
79+
with:
80+
java-version: 17
81+
distribution: temurin
82+
- run: .kokoro/build.sh
83+
env:
84+
JOB_TYPE: test
85+
windows:
86+
needs: filter
87+
if: ${{ needs.filter.outputs.library == 'true' }}
88+
runs-on: windows-latest
89+
steps:
90+
- name: Support longpaths
91+
run: git config --system core.longpaths true
92+
- name: Support longpaths
93+
run: git config --system core.longpaths true
94+
- uses: actions/checkout@v4
95+
- uses: actions/setup-java@v4
96+
with:
97+
distribution: temurin
98+
java-version: 8
99+
- run: java -version
100+
- run: .kokoro/build.sh
101+
env:
102+
JOB_TYPE: test
103+
dependencies:
104+
needs: filter
105+
if: ${{ needs.filter.outputs.library == 'true' }}
106+
runs-on: ubuntu-latest
107+
steps:
108+
- uses: actions/checkout@v4
109+
- uses: actions/setup-java@v4
110+
with:
111+
distribution: temurin
112+
java-version: 17
113+
- run: .kokoro/dependencies.sh
114+
javadoc:
115+
needs: filter
116+
if: ${{ needs.filter.outputs.library == 'true' }}
117+
runs-on: ubuntu-latest
118+
steps:
119+
- uses: actions/checkout@v4
120+
- uses: actions/setup-java@v4
121+
with:
122+
distribution: temurin
123+
java-version: 17
124+
- run: java -version
125+
- run: .kokoro/build.sh
126+
env:
127+
JOB_TYPE: javadoc
128+
lint:
129+
needs: filter
130+
if: ${{ needs.filter.outputs.library == 'true' }}
131+
runs-on: ubuntu-latest
132+
steps:
133+
- uses: actions/checkout@v4
134+
with:
135+
fetch-depth: 0
136+
- uses: actions/setup-java@v4
137+
with:
138+
distribution: temurin
139+
java-version: 17
140+
- run: java -version
141+
- run: .kokoro/build.sh
142+
env:
143+
JOB_TYPE: lint
144+
HEAD_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
145+
BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }}
146+
required:
147+
needs: [ units, units-java8, windows, dependencies, javadoc, lint ]
148+
name: conditional-required-check
149+
if: ${{ always() }} # Always run even if any "needs" jobs fail
150+
runs-on: ubuntu-22.04
151+
steps:
152+
- name: Fail if any previous failure
153+
if: ${{ contains(needs.*.result, 'failure') }}
154+
run: exit 1
155+
- name: Success otherwise
156+
run: echo "Success!"

.kokoro/common.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ excluded_modules=(
2121
'java-vertexai'
2222
'java-logging'
2323
'java-bigquery'
24+
'java-bigquery-jdbc'
2425
'java-bigquerystorage'
2526
'java-datastore'
2627
'java-logging-logback'

.kokoro/presubmit/bigquery-graalvm-native-presubmit.cfg

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,4 @@ env_vars: {
4141
value: "java-bigquery"
4242
}
4343

44-
env_vars: {
45-
key: "INTEGRATION_TEST_ARGS"
46-
value: "-pl !google-cloud-bigquery-jdbc"
47-
}
44+

.kokoro/presubmit/bigquery-integration.cfg

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,4 @@ env_vars: {
3838
value: "java-bigquery"
3939
}
4040

41-
env_vars: {
42-
key: "INTEGRATION_TEST_ARGS"
43-
value: "-pl !google-cloud-bigquery-jdbc"
44-
}
41+

java-bigquery/.cloudbuild/jdbc_nightly.yaml renamed to java-bigquery-jdbc/.cloudbuild/jdbc_nightly.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ steps:
2424
id: "IT Tests"
2525
timeout: 10000s
2626
entrypoint: 'bash'
27-
args: ['java-bigquery/.cloudbuild/scripts/jdbc-nightly.sh']
27+
args: ['java-bigquery-jdbc/.cloudbuild/scripts/jdbc-nightly.sh']
2828
secretEnv: ['SA_EMAIL', 'KMS_RESOURCE_PATH', 'SA_SECRET']
2929

3030
availableSecrets:

java-bigquery/.cloudbuild/jdbc_presubmit.yaml renamed to java-bigquery-jdbc/.cloudbuild/jdbc_presubmit.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ steps:
2727
id: "IT Tests"
2828
timeout: 2000s
2929
entrypoint: 'bash'
30-
args: ['java-bigquery/.cloudbuild/scripts/jdbc-presubmit.sh']
30+
args: ['java-bigquery-jdbc/.cloudbuild/scripts/jdbc-presubmit.sh']
3131
secretEnv: ['SA_EMAIL', 'KMS_RESOURCE_PATH', 'SA_SECRET']
3232
availableSecrets:
3333
secretManager:

java-bigquery/.cloudbuild/scripts/jdbc-nightly.sh renamed to java-bigquery-jdbc/.cloudbuild/scripts/jdbc-nightly.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ ROOT_FOLDER=$(git rev-parse --show-toplevel)
22

33
cd ${ROOT_FOLDER}
44
source .kokoro/common.sh
5-
install_modules java-bigquery
5+
install_modules java-bigquery-jdbc
66

7-
cd ${ROOT_FOLDER}/java-bigquery/google-cloud-bigquery-jdbc
7+
cd ${ROOT_FOLDER}/java-bigquery-jdbc
88
make integration-test test=ITNightlyTests

java-bigquery/.cloudbuild/scripts/jdbc-presubmit.sh renamed to java-bigquery-jdbc/.cloudbuild/scripts/jdbc-presubmit.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ ROOT_FOLDER=$(git rev-parse --show-toplevel)
22

33
cd ${ROOT_FOLDER}
44
source .kokoro/common.sh
5-
install_modules java-bigquery
5+
install_modules java-bigquery-jdbc
66

7-
cd ${ROOT_FOLDER}/java-bigquery/google-cloud-bigquery-jdbc
7+
cd ${ROOT_FOLDER}/java-bigquery-jdbc
88
make integration-test test=ITPresubmitTests

java-bigquery-jdbc/pom.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,7 @@
361361
<dependency>
362362
<groupId>org.mockito</groupId>
363363
<artifactId>mockito-junit-jupiter</artifactId>
364+
<version>4.11.0</version>
364365
<scope>test</scope>
365366
</dependency>
366367
<dependency>
@@ -409,6 +410,15 @@
409410
</build>
410411
</profile>
411412

413+
<!-- skip tests if bulkTests profile is enabled (when testing the rest of the monorepo) -->
414+
<profile>
415+
<id>bulkTests</id>
416+
<properties>
417+
<skipTests>true</skipTests>
418+
<skipSurefire>true</skipSurefire>
419+
</properties>
420+
</profile>
421+
412422
<!-- Profile used inside docker -->
413423
<profile>
414424
<id>docker</id>

0 commit comments

Comments
 (0)