Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

Commit d433897

Browse files
committed
chore(jdbc): add nightly JAR build
1 parent e3eeb94 commit d433897

2 files changed

Lines changed: 59 additions & 0 deletions

File tree

.cloudbuild/jdbc_nightly.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ steps:
3535
args: ['.kokoro/build.sh']
3636
env:
3737
- 'JOB_TYPE=jdbc-nightly-integration'
38+
- name: 'gcr.io/cloud-devrel-public-resources/java11'
39+
id: "Nightly build"
40+
timeout: 10000s
41+
entrypoint: 'bash'
42+
args: ['.kokoro/jdbc-release.sh']
3843

3944
availableSecrets:
4045
secretManager:

.kokoro/jdbc-release.sh

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#!/bin/bash
2+
# Copyright 2026 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
17+
cd ${DIR}/../google-cloud-bigquery-jdbc
18+
19+
FOLDER=release
20+
DATE=$(date '+%Y-%m-%d')
21+
COMMIT=$(git rev-parse HEAD)
22+
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
23+
BUCKET=gs://bq_devtools_release_private/drivers/jdbc
24+
NIGHTLY_BUILD_DESTINATION=${BUCKET}/nightly/${VERSION}/${DATE}
25+
26+
# All dependencies release
27+
mkdir -p ./${FOLDER}
28+
make docker-package-all-dependencies PACKAGE_DESTINATION=$(pwd)/${FOLDER}
29+
JAR_FILE=$(find . -wholename "./${FOLDER}/*jar" -print -quit)
30+
JAR_NAME=$(basename ${JAR_FILE} .jar)-${DATE}-${COMMIT}
31+
32+
gsutil cp ${JAR_FILE} "${NIGHTLY_BUILD_DESTINATION}/${JAR_NAME}.jar"
33+
rm -rf ${FOLDER}
34+
35+
# All dependencies release - shaded
36+
mkdir -p ./${FOLDER}
37+
make docker-package-all-dependencies-shaded PACKAGE_DESTINATION=$(pwd)/${FOLDER}
38+
JAR_FILE=$(find . -wholename "./${FOLDER}/*jar" -print -quit)
39+
40+
gsutil cp ${JAR_FILE} "${NIGHTLY_BUILD_DESTINATION}/${JAR_NAME}-shaded.jar"
41+
rm -rf ${FOLDER}
42+
43+
# Thin release
44+
mkdir -p ./${FOLDER}
45+
make docker-package PACKAGE_DESTINATION=$(pwd)/${FOLDER}
46+
ZIP_FILE=$(find . -wholename "./${FOLDER}/*zip" -print -quit)
47+
48+
gsutil cp ${ZIP_FILE} "${NIGHTLY_BUILD_DESTINATION}/${JAR_NAME}.zip"
49+
rm -rf ${FOLDER}
50+
51+
# Update latest version
52+
gsutil cp "${NIGHTLY_BUILD_DESTINATION}/${JAR_NAME}.zip" "${BUCKET}/google-cloud-bigquery-jdbc-latest.zip"
53+
gsutil cp "${NIGHTLY_BUILD_DESTINATION}/${JAR_NAME}.jar" "${BUCKET}/google-cloud-bigquery-jdbc-latest-full.jar"
54+
gsutil cp "${NIGHTLY_BUILD_DESTINATION}/${JAR_NAME}-shaded.jar" "${BUCKET}/google-cloud-bigquery-jdbc-latest-full-shaded.jar"

0 commit comments

Comments
 (0)