Factor out testnet automation SW version resolution
This commit is contained in:
parent
c3bb4b7405
commit
a15f60a291
|
@ -249,3 +249,16 @@ EOF
|
||||||
--data "$payLoad" \
|
--data "$payLoad" \
|
||||||
"$SLACK_WEBHOOK_URL"
|
"$SLACK_WEBHOOK_URL"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function get_net_launch_software_version_launch_args() {
|
||||||
|
declare channel="${1?}"
|
||||||
|
declare artifact_basename="${2?}"
|
||||||
|
declare return_varname="${3:?}"
|
||||||
|
if [[ -n $channel ]]; then
|
||||||
|
eval "$return_varname=-t\ \$channel"
|
||||||
|
else
|
||||||
|
execution_step "Downloading tar from build artifacts (${artifact_basename})"
|
||||||
|
buildkite-agent artifact download "${artifact_basename}*.tar.bz2" .
|
||||||
|
eval "$return_varname=-T\ \${artifact_basename}*.tar.bz2"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
|
@ -120,19 +120,15 @@ function launch_testnet() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
execution_step "Starting bootstrap node and ${NUMBER_OF_VALIDATOR_NODES} validator nodes"
|
execution_step "Starting bootstrap node and ${NUMBER_OF_VALIDATOR_NODES} validator nodes"
|
||||||
if [[ -n $CHANNEL ]]; then
|
|
||||||
# shellcheck disable=SC2068
|
declare -g version_args
|
||||||
# shellcheck disable=SC2086
|
get_net_launch_software_version_launch_args "$CHANNEL" "solana-release" version_args
|
||||||
"${REPO_ROOT}"/net/net.sh start -t "$CHANNEL" \
|
|
||||||
-c idle=$NUMBER_OF_CLIENT_NODES $maybeStartAllowBootFailures \
|
# shellcheck disable=SC2068
|
||||||
--gpu-mode $startGpuMode
|
# shellcheck disable=SC2086
|
||||||
else
|
"${REPO_ROOT}"/net/net.sh start $version_args \
|
||||||
# shellcheck disable=SC2068
|
-c idle=$NUMBER_OF_CLIENT_NODES $maybeStartAllowBootFailures \
|
||||||
# shellcheck disable=SC2086
|
--gpu-mode $startGpuMode
|
||||||
"${REPO_ROOT}"/net/net.sh start -T solana-release*.tar.bz2 \
|
|
||||||
-c idle=$NUMBER_OF_CLIENT_NODES $maybeStartAllowBootFailures \
|
|
||||||
--gpu-mode $startGpuMode
|
|
||||||
fi
|
|
||||||
|
|
||||||
execution_step "Waiting for bootstrap validator's stake to fall below ${BOOTSTRAP_VALIDATOR_MAX_STAKE_THRESHOLD}%"
|
execution_step "Waiting for bootstrap validator's stake to fall below ${BOOTSTRAP_VALIDATOR_MAX_STAKE_THRESHOLD}%"
|
||||||
wait_for_bootstrap_validator_stake_drop "$BOOTSTRAP_VALIDATOR_MAX_STAKE_THRESHOLD"
|
wait_for_bootstrap_validator_stake_drop "$BOOTSTRAP_VALIDATOR_MAX_STAKE_THRESHOLD"
|
||||||
|
@ -288,11 +284,6 @@ if [[ -n $missingParameters ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $CHANNEL ]]; then
|
|
||||||
execution_step "Downloading tar from build artifacts"
|
|
||||||
buildkite-agent artifact download "solana-release*.tar.bz2" .
|
|
||||||
fi
|
|
||||||
|
|
||||||
maybeClientOptions=${CLIENT_OPTIONS:+"-c"}
|
maybeClientOptions=${CLIENT_OPTIONS:+"-c"}
|
||||||
maybeCustomMachineType=${VALIDATOR_NODE_MACHINE_TYPE:+"--custom-machine-type"}
|
maybeCustomMachineType=${VALIDATOR_NODE_MACHINE_TYPE:+"--custom-machine-type"}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue