Only print BUILDKITE environment variables when they were present (#14487)
* Only print BUILDKITE environment variables when they were present This was causing errors running the build_containers.sh script locally, since only buildkite was passing these (and errors stop the script, so nothing was built). * Simplify conditional guards to check only for BUILDKITE variable https://buildkite.com/docs/pipelines/environment-variables#bk-env-vars-buildkite describes the simplest "this is buildkite" check, BUILDKITE is always true when running in buildkite.
This commit is contained in:
parent
bcd804f44d
commit
ccbac93ea5
1 changed files with 7 additions and 4 deletions
|
|
@ -161,10 +161,13 @@ function prune_containers {
|
|||
|
||||
trap prune_containers ERR INT EXIT
|
||||
|
||||
echo "Branch: $BUILDKITE_BRANCH"
|
||||
echo "PR : $BUILDKITE_PULL_REQUEST"
|
||||
echo "Commit: $BUILDKITE_COMMIT"
|
||||
echo "Tag : $BUILDKITE_TAG"
|
||||
if [ -v BUILDKITE ]
|
||||
then
|
||||
echo "Branch: $BUILDKITE_BRANCH"
|
||||
echo "PR : $BUILDKITE_PULL_REQUEST"
|
||||
echo "Commit: $BUILDKITE_COMMIT"
|
||||
echo "Tag : $BUILDKITE_TAG"
|
||||
fi
|
||||
|
||||
if [ ! -v BUILDKITE_BRANCH ]; then
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue