solana/.buildkite/pipeline-upload.sh

32 lines
967 B
Bash
Raw Normal View History

2018-12-15 12:04:27 -08:00
#!/usr/bin/env bash
#
# This script is used to upload the full buildkite pipeline. The steps defined
# in the buildkite UI should simply be:
#
# steps:
2018-12-15 16:07:48 -08:00
# - command: ".buildkite/pipeline-upload.sh"
2018-12-15 12:04:27 -08:00
#
set -e
cd "$(dirname "$0")"/..
if [[ -n $BUILDKITE_TAG ]]; then
buildkite-agent annotate --style info --context release-tag \
"https://github.com/solana-labs/solana/releases/$BUILDKITE_TAG"
buildkite-agent pipeline upload ci/buildkite-release.yml
else
if [[ $BUILDKITE_BRANCH =~ ^pull ]]; then
# Add helpful link back to the corresponding Github Pull Request
buildkite-agent annotate --style info --context pr-backlink \
"Github Pull Request: https://github.com/solana-labs/solana/$BUILDKITE_BRANCH"
fi
2018-12-15 12:04:27 -08:00
if [[ $BUILDKITE_MESSAGE =~ GitBook: ]]; then
buildkite-agent annotate --style info --context gitbook-ci-skip \
"GitBook commit detected, CI skipped"
exit
fi
2018-12-15 12:04:27 -08:00
buildkite-agent pipeline upload ci/buildkite.yml
fi