Skip to content
Closed
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
4 changes: 1 addition & 3 deletions bin/split-repo-post-process.sh
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ if [[ "\${RUNNING_IN_CI:-}" == "true" ]]; then
# Safe default: HEAD~1..HEAD
DIFF_RANGE="HEAD~1..HEAD"

if git diff --quiet "\${DIFF_RANGE}" -- "\${RELATIVE_PKG_PATH}"; then
if git diff --quiet "\${DIFF_RANGE}" -- ":(top)\${RELATIVE_PKG_PATH}"; then
echo "No changes detected in \${RELATIVE_PKG_PATH}. Skipping tests."
exit 0
else
Expand All @@ -190,8 +190,6 @@ else
fi


echo "Fixing .trampolinerc for populate-secrets.sh"
gsed -i 's|source ${PROJECT_ROOT}/.kokoro/populate-secrets.sh|source ${PROJECT_ROOT}/'"${PACKAGE_PATH}"'/.kokoro/populate-secrets.sh|' "${PACKAGE_PATH}"/.trampolinerc

# add changes to local git directory
git add .
Expand Down
8 changes: 4 additions & 4 deletions core/common/.kokoro/trampoline_v2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,6 @@ else
PROJECT_ROOT="$(repo_root $(pwd))/core/common"
fi

log_yellow "Changing to the project root: ${PROJECT_ROOT}."
cd "${PROJECT_ROOT}"

# Auto-injected conditional check
# Check if the package directory has changes. If not, skip tests.
if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then
Expand All @@ -266,14 +263,17 @@ if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then
# Safe default: HEAD~1..HEAD
DIFF_RANGE="HEAD~1..HEAD"

if git diff --quiet "${DIFF_RANGE}" -- "${RELATIVE_PKG_PATH}"; then
if git diff --quiet "${DIFF_RANGE}" -- ":(top)${RELATIVE_PKG_PATH}"; then
echo "No changes detected in ${RELATIVE_PKG_PATH}. Skipping tests."
exit 0
else
echo "Changes detected in ${RELATIVE_PKG_PATH}. Proceeding with tests."
fi
fi

log_yellow "Changing to the project root: ${PROJECT_ROOT}."
cd "${PROJECT_ROOT}"

# To support relative path for `TRAMPOLINE_SERVICE_ACCOUNT`, we need
# to use this environment variable in `PROJECT_ROOT`.
if [[ -n "${TRAMPOLINE_SERVICE_ACCOUNT:-}" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion core/common/.trampolinerc
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ if [[ -z "${TRAMPOLINE_BUILD_FILE:-}" ]]; then
fi

# Secret Manager secrets.
source ${PROJECT_ROOT}/core/common/.kokoro/populate-secrets.sh
source ${PROJECT_ROOT}/.kokoro/populate-secrets.sh
8 changes: 4 additions & 4 deletions core/paginator/.kokoro/trampoline_v2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,6 @@ else
PROJECT_ROOT="$(repo_root $(pwd))/core/paginator"
fi

log_yellow "Changing to the project root: ${PROJECT_ROOT}."
cd "${PROJECT_ROOT}"

# Auto-injected conditional check
# Check if the package directory has changes. If not, skip tests.
if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then
Expand All @@ -266,14 +263,17 @@ if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then
# Safe default: HEAD~1..HEAD
DIFF_RANGE="HEAD~1..HEAD"

if git diff --quiet "${DIFF_RANGE}" -- "${RELATIVE_PKG_PATH}"; then
if git diff --quiet "${DIFF_RANGE}" -- ":(top)${RELATIVE_PKG_PATH}"; then
echo "No changes detected in ${RELATIVE_PKG_PATH}. Skipping tests."
exit 0
else
echo "Changes detected in ${RELATIVE_PKG_PATH}. Proceeding with tests."
fi
fi

log_yellow "Changing to the project root: ${PROJECT_ROOT}."
cd "${PROJECT_ROOT}"

# To support relative path for `TRAMPOLINE_SERVICE_ACCOUNT`, we need
# to use this environment variable in `PROJECT_ROOT`.
if [[ -n "${TRAMPOLINE_SERVICE_ACCOUNT:-}" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion core/paginator/.trampolinerc
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ if [[ -z "${TRAMPOLINE_BUILD_FILE:-}" ]]; then
fi

# Secret Manager secrets.
source ${PROJECT_ROOT}/core/paginator/.kokoro/populate-secrets.sh
source ${PROJECT_ROOT}/.kokoro/populate-secrets.sh
8 changes: 4 additions & 4 deletions core/precise-date/.kokoro/trampoline_v2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,6 @@ else
PROJECT_ROOT="$(repo_root $(pwd))/core/precise-date"
fi

log_yellow "Changing to the project root: ${PROJECT_ROOT}."
cd "${PROJECT_ROOT}"

# Auto-injected conditional check
# Check if the package directory has changes. If not, skip tests.
if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then
Expand All @@ -266,14 +263,17 @@ if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then
# Safe default: HEAD~1..HEAD
DIFF_RANGE="HEAD~1..HEAD"

if git diff --quiet "${DIFF_RANGE}" -- "${RELATIVE_PKG_PATH}"; then
if git diff --quiet "${DIFF_RANGE}" -- ":(top)${RELATIVE_PKG_PATH}"; then
echo "No changes detected in ${RELATIVE_PKG_PATH}. Skipping tests."
exit 0
else
echo "Changes detected in ${RELATIVE_PKG_PATH}. Proceeding with tests."
fi
fi

log_yellow "Changing to the project root: ${PROJECT_ROOT}."
cd "${PROJECT_ROOT}"

# To support relative path for `TRAMPOLINE_SERVICE_ACCOUNT`, we need
# to use this environment variable in `PROJECT_ROOT`.
if [[ -n "${TRAMPOLINE_SERVICE_ACCOUNT:-}" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion core/precise-date/.trampolinerc
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ if [[ -z "${TRAMPOLINE_BUILD_FILE:-}" ]]; then
fi

# Secret Manager secrets.
source ${PROJECT_ROOT}/core/precise-date/.kokoro/populate-secrets.sh
source ${PROJECT_ROOT}/.kokoro/populate-secrets.sh
8 changes: 4 additions & 4 deletions core/projectify/.kokoro/trampoline_v2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,6 @@ else
PROJECT_ROOT="$(repo_root $(pwd))/core/projectify"
fi

log_yellow "Changing to the project root: ${PROJECT_ROOT}."
cd "${PROJECT_ROOT}"

# Auto-injected conditional check
# Check if the package directory has changes. If not, skip tests.
if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then
Expand All @@ -266,14 +263,17 @@ if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then
# Safe default: HEAD~1..HEAD
DIFF_RANGE="HEAD~1..HEAD"

if git diff --quiet "${DIFF_RANGE}" -- "${RELATIVE_PKG_PATH}"; then
if git diff --quiet "${DIFF_RANGE}" -- ":(top)${RELATIVE_PKG_PATH}"; then
echo "No changes detected in ${RELATIVE_PKG_PATH}. Skipping tests."
exit 0
else
echo "Changes detected in ${RELATIVE_PKG_PATH}. Proceeding with tests."
fi
fi

log_yellow "Changing to the project root: ${PROJECT_ROOT}."
cd "${PROJECT_ROOT}"

# To support relative path for `TRAMPOLINE_SERVICE_ACCOUNT`, we need
# to use this environment variable in `PROJECT_ROOT`.
if [[ -n "${TRAMPOLINE_SERVICE_ACCOUNT:-}" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion core/projectify/.trampolinerc
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ if [[ -z "${TRAMPOLINE_BUILD_FILE:-}" ]]; then
fi

# Secret Manager secrets.
source ${PROJECT_ROOT}/core/projectify/.kokoro/populate-secrets.sh
source ${PROJECT_ROOT}/.kokoro/populate-secrets.sh
8 changes: 4 additions & 4 deletions core/promisify/.kokoro/trampoline_v2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,6 @@ else
PROJECT_ROOT="$(repo_root $(pwd))/core/promisify"
fi

log_yellow "Changing to the project root: ${PROJECT_ROOT}."
cd "${PROJECT_ROOT}"

# Auto-injected conditional check
# Check if the package directory has changes. If not, skip tests.
if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then
Expand All @@ -266,14 +263,17 @@ if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then
# Safe default: HEAD~1..HEAD
DIFF_RANGE="HEAD~1..HEAD"

if git diff --quiet "${DIFF_RANGE}" -- "${RELATIVE_PKG_PATH}"; then
if git diff --quiet "${DIFF_RANGE}" -- ":(top)${RELATIVE_PKG_PATH}"; then
echo "No changes detected in ${RELATIVE_PKG_PATH}. Skipping tests."
exit 0
else
echo "Changes detected in ${RELATIVE_PKG_PATH}. Proceeding with tests."
fi
fi

log_yellow "Changing to the project root: ${PROJECT_ROOT}."
cd "${PROJECT_ROOT}"

# To support relative path for `TRAMPOLINE_SERVICE_ACCOUNT`, we need
# to use this environment variable in `PROJECT_ROOT`.
if [[ -n "${TRAMPOLINE_SERVICE_ACCOUNT:-}" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion core/promisify/.trampolinerc
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ if [[ -z "${TRAMPOLINE_BUILD_FILE:-}" ]]; then
fi

# Secret Manager secrets.
source ${PROJECT_ROOT}/core/promisify/.kokoro/populate-secrets.sh
source ${PROJECT_ROOT}/.kokoro/populate-secrets.sh
8 changes: 4 additions & 4 deletions handwritten/bigquery-storage/.kokoro/trampoline_v2.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion handwritten/bigquery-storage/.trampolinerc
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ if [[ -z "${TRAMPOLINE_BUILD_FILE:-}" ]]; then
fi

# Secret Manager secrets.
source ${PROJECT_ROOT}/handwritten/bigquery-storage/.kokoro/populate-secrets.sh
source ${PROJECT_ROOT}/.kokoro/populate-secrets.sh
8 changes: 4 additions & 4 deletions handwritten/bigquery/.kokoro/trampoline_v2.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion handwritten/bigquery/.trampolinerc
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ if [[ -z "${TRAMPOLINE_BUILD_FILE:-}" ]]; then
fi

# Secret Manager secrets.
source ${PROJECT_ROOT}/handwritten/bigquery/.kokoro/populate-secrets.sh
source ${PROJECT_ROOT}/.kokoro/populate-secrets.sh
Loading
Loading