Only check CHANNEL_BRANCH if TESTNET_TAG is not set from buildkite (#3701)

This commit is contained in:
Dan Albert
2019-04-09 15:04:34 -07:00
committed by GitHub
parent fc34c1370b
commit 5f3bf853c6

View File

@ -68,28 +68,31 @@ echo "SOLANA_METRICS_CONFIG: $SOLANA_METRICS_CONFIG"
ci/channel-info.sh ci/channel-info.sh
eval "$(ci/channel-info.sh)" eval "$(ci/channel-info.sh)"
case $TESTNET in if [[ -n $TESTNET_TAG ]]; then
testnet-edge|testnet-edge-perf) CHANNEL_OR_TAG=$TESTNET_TAG
CHANNEL_OR_TAG=edge else
CHANNEL_BRANCH=$EDGE_CHANNEL case $TESTNET in
;; testnet-edge|testnet-edge-perf)
testnet-beta|testnet-beta-perf) CHANNEL_OR_TAG=edge
CHANNEL_OR_TAG=beta CHANNEL_BRANCH=$EDGE_CHANNEL
CHANNEL_BRANCH=$BETA_CHANNEL ;;
;; testnet-beta|testnet-beta-perf)
testnet|testnet-perf) CHANNEL_OR_TAG=beta
CHANNEL_OR_TAG=$STABLE_CHANNEL_LATEST_TAG CHANNEL_BRANCH=$BETA_CHANNEL
CHANNEL_BRANCH=$STABLE_CHANNEL ;;
;; testnet|testnet-perf)
*) CHANNEL_OR_TAG=$STABLE_CHANNEL_LATEST_TAG
echo "Error: Invalid TESTNET=$TESTNET" CHANNEL_BRANCH=$STABLE_CHANNEL
exit 1 ;;
;; *)
esac echo "Error: Invalid TESTNET=$TESTNET"
exit 1
;;
esac
if [[ $BUILDKITE_BRANCH != "$CHANNEL_BRANCH" ]]; then if [[ $BUILDKITE_BRANCH != "$CHANNEL_BRANCH" ]]; then
( (
cat <<EOF cat <<EOF
steps: steps:
- trigger: "$BUILDKITE_PIPELINE_SLUG" - trigger: "$BUILDKITE_PIPELINE_SLUG"
async: true async: true
@ -100,8 +103,9 @@ steps:
TESTNET: "$TESTNET" TESTNET: "$TESTNET"
TESTNET_OP: "$TESTNET_OP" TESTNET_OP: "$TESTNET_OP"
EOF EOF
) | buildkite-agent pipeline upload ) | buildkite-agent pipeline upload
exit 0 exit 0
fi
fi fi