This repository was archived by the owner on Aug 30, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 136
chore(jdbc): add nightly JAR build #4076
Merged
Merged
Changes from 4 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
d433897
chore(jdbc): add nightly JAR build
logachev b16cfd0
Merge branch 'main' into kirl/release
logachev 13ce325
gemini review
logachev 45cbbb2
Merge branch 'kirl/release' of github.com:googleapis/java-bigquery in…
logachev 5064192
Update pom.xml to build thin & uber jars
logachev e2aa387
Move GCS bucket to env
logachev 8ef8172
Update shading config
logachev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| #!/bin/bash | ||
| # Copyright 2026 Google LLC | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
| cd "${DIR}/../google-cloud-bigquery-jdbc" | ||
|
|
||
| FOLDER=release | ||
| DATE=$(date '+%Y-%m-%d') | ||
| COMMIT=$(git rev-parse --short HEAD) | ||
| VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) | ||
| BUCKET=gs://bq_devtools_release_private/drivers/jdbc | ||
| NIGHTLY_BUILD_DESTINATION="${BUCKET}/nightly/${VERSION}/${DATE}" | ||
|
|
||
| # All dependencies release | ||
| mkdir -p "./${FOLDER}" | ||
| make docker-package-all-dependencies PACKAGE_DESTINATION="$(pwd)/${FOLDER}" | ||
| JAR_FILE=$(find . -wholename "./${FOLDER}/*jar" -print -quit) | ||
| JAR_NAME=$(basename "${JAR_FILE}" .jar)-${DATE}-${COMMIT} | ||
|
|
||
| gsutil cp "${JAR_FILE}" "${NIGHTLY_BUILD_DESTINATION}/${JAR_NAME}.jar" | ||
| rm -rf "${FOLDER}" | ||
|
|
||
| # All dependencies release - shaded | ||
| mkdir -p "./${FOLDER}" | ||
| make docker-package-all-dependencies-shaded PACKAGE_DESTINATION="$(pwd)/${FOLDER}" | ||
| JAR_FILE=$(find . -wholename "./${FOLDER}/*jar" -print -quit) | ||
|
|
||
| gsutil cp "${JAR_FILE}" "${NIGHTLY_BUILD_DESTINATION}/${JAR_NAME}-shaded.jar" | ||
| rm -rf "${FOLDER}" | ||
|
|
||
| # Thin release | ||
| mkdir -p "./${FOLDER}" | ||
| make docker-package PACKAGE_DESTINATION="$(pwd)/${FOLDER}" | ||
| ZIP_FILE=$(find . -wholename "./${FOLDER}/*zip" -print -quit) | ||
|
|
||
| gsutil cp "${ZIP_FILE}" "${NIGHTLY_BUILD_DESTINATION}/${JAR_NAME}.zip" | ||
| rm -rf "${FOLDER}" | ||
|
|
||
| # Update latest version | ||
| gsutil cp "${NIGHTLY_BUILD_DESTINATION}/${JAR_NAME}.zip" "${BUCKET}/google-cloud-bigquery-jdbc-latest.zip" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. qq, how does this script do auth to determine if you have permission to upload?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. CloudBuild assigned service account has write permissions |
||
| gsutil cp "${NIGHTLY_BUILD_DESTINATION}/${JAR_NAME}.jar" "${BUCKET}/google-cloud-bigquery-jdbc-latest-full.jar" | ||
| gsutil cp "${NIGHTLY_BUILD_DESTINATION}/${JAR_NAME}-shaded.jar" "${BUCKET}/google-cloud-bigquery-jdbc-latest-full-shaded.jar" | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing customers already pull from this bucket and it's public. Just want to check if this being public is fine/ should we put this as an env var?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's internal bucket; I moved it to CloudBuild env