Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .kokoro/release.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

build_file: "github/data-manager-java/.kokoro/release.sh"

# Execute a dry run by default
# Default to DRY_RUN=true for safety; can be overridden via API or UI
env_vars: {
key: "DRY_RUN"
value: "true"
Expand All @@ -11,4 +11,3 @@ env_vars: {
container_properties {
docker_image: "us-central1-docker.pkg.dev/kokoro-container-bakery/kokoro/ubuntu/ubuntu2204/full:current"
}

11 changes: 10 additions & 1 deletion .kokoro/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,18 @@ set -euo pipefail
# Explicitly disable xtrace
set +x

# Default to dry-run for safety unless DRY_RUN=false is explicitly passed.
DRY_RUN="${DRY_RUN:-true}"
if [[ "${DRY_RUN}" != "true" && "${DRY_RUN}" != "false" ]]; then
echo "ERROR: DRY_RUN must be 'true' or 'false' (got '${DRY_RUN}')." >&2
exit 1
fi

REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "${REPO_DIR}"

echo "=== Building and Releasing from: ${REPO_DIR} (DRY_RUN=${DRY_RUN}) ==="

# Ensure Java 17 is used on Kokoro Ubuntu 22.04 workers (which default to OpenJDK 11)
if [[ ! -d "/usr/lib/jvm/java-17-openjdk-amd64" ]]; then
echo "ERROR: Kokoro worker missing expected OpenJDK 17 at /usr/lib/jvm/java-17-openjdk-amd64" >&2
Expand Down Expand Up @@ -78,7 +87,7 @@ fi
# -----------------------------------------------------------------------------
# 3. DRY_RUN Check
# -----------------------------------------------------------------------------
if [[ "${DRY_RUN:-false}" == "true" ]]; then
if [[ "${DRY_RUN}" == "true" ]]; then
echo "=== DRY_RUN is enabled. Artifacts staged in Artifact Registry. ==="
echo "Skipping GCS manifest upload to Exit Gate."
exit 0
Expand Down
Loading