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,26 +68,29 @@ 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
else
case $TESTNET in
testnet-edge|testnet-edge-perf)
CHANNEL_OR_TAG=edge CHANNEL_OR_TAG=edge
CHANNEL_BRANCH=$EDGE_CHANNEL CHANNEL_BRANCH=$EDGE_CHANNEL
;; ;;
testnet-beta|testnet-beta-perf) testnet-beta|testnet-beta-perf)
CHANNEL_OR_TAG=beta CHANNEL_OR_TAG=beta
CHANNEL_BRANCH=$BETA_CHANNEL CHANNEL_BRANCH=$BETA_CHANNEL
;; ;;
testnet|testnet-perf) testnet|testnet-perf)
CHANNEL_OR_TAG=$STABLE_CHANNEL_LATEST_TAG CHANNEL_OR_TAG=$STABLE_CHANNEL_LATEST_TAG
CHANNEL_BRANCH=$STABLE_CHANNEL CHANNEL_BRANCH=$STABLE_CHANNEL
;; ;;
*) *)
echo "Error: Invalid TESTNET=$TESTNET" echo "Error: Invalid TESTNET=$TESTNET"
exit 1 exit 1
;; ;;
esac esac
if [[ $BUILDKITE_BRANCH != "$CHANNEL_BRANCH" ]]; then if [[ $BUILDKITE_BRANCH != "$CHANNEL_BRANCH" ]]; then
( (
cat <<EOF cat <<EOF
steps: steps:
@ -102,6 +105,7 @@ steps:
EOF EOF
) | buildkite-agent pipeline upload ) | buildkite-agent pipeline upload
exit 0 exit 0
fi
fi fi