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-python/.kokoro/release.sh"

# TODO: Remove after verifying uploads to artifact registry are WAI.
# 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: 9 additions & 2 deletions .kokoro/release.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
#!/bin/bash
set -euo pipefail

# 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

# -----------------------------------------------------------------------------
# 1. Workspace & Directory Resolution
# -----------------------------------------------------------------------------
# Navigate to the root of the repository
REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "${REPO_DIR}"

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

# -----------------------------------------------------------------------------
# 2. Environment & Tooling Setup
Expand Down Expand Up @@ -77,7 +84,7 @@ twine upload --repository-url "${EXIT_GATE_REPO}" dist/*
# -----------------------------------------------------------------------------
# If DRY_RUN is set to "true", stop here so you can verify the AR staging
# without publishing to public PyPI.
if [[ "${DRY_RUN:-false}" == "true" ]]; then
if [[ "${DRY_RUN}" == "true" ]]; then
echo "=== DRY_RUN is enabled. Skipping manifest upload to Exit Gate. ==="
echo "Artifacts are staged in Artifact Registry."
exit 0
Expand Down
Loading