mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Restrict target branch existence check to public BuildKite pipeline.
PiperOrigin-RevId: 514942919
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
set -euo pipefail
|
||||
|
||||
# Check that the target branch exists.
|
||||
git fetch origin "${BUILDKITE_BRANCH}" || {
|
||||
echo "Branch ${BUILDKITE_BRANCH} no longer exists; it was probably deleted by the time we got to it." >&2
|
||||
exit 1
|
||||
}
|
||||
if [[ "${BUILDKITE_PIPELINE_NAME:-}" == "Pipeline" ]]; then
|
||||
# Check that the target branch exists.
|
||||
git fetch origin "${BUILDKITE_BRANCH}" || {
|
||||
echo "Branch ${BUILDKITE_BRANCH} no longer exists; it was probably deleted by the time we got to it." >&2
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
|
||||
# Download any build-specific configuration that has been uploaded.
|
||||
# This allows top-level steps to override all subsequent steps.
|
||||
|
||||
Reference in New Issue
Block a user