ci: harden buildkite `group` generator (#32568)

This commit is contained in:
Trent Nelson 2023-07-20 21:22:44 -06:00 committed by GitHub
parent 19f5b49abb
commit b81678fd6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -8,8 +8,14 @@ indent() {
}
group() {
# shellcheck disable=SC2016 # don't want these expressions expanded
local name="${1:?'buildkite `group` generator requires a `name`'}"
if [[ $# -lt 2 ]]; then
echo "no steps provided for buildkite group \`$name\`, omitting from pipeline" 1>&2
return
fi
cat <<EOF | indent
- group: "$1"
- group: "$name"
steps:
EOF
shift