Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 26 lines (19 sloc) 632 Bytes
#!/usr/bin/env bash
set -euo pipefail
# Check that all required variables are set
for NAME in GH_USERNAME GH_PASSWORD; do
eval VALUE=\$$NAME
if [[ -z ${VALUE+x} ]]; then
echo "$NAME is not set, moving on"
exit 0
fi
done
if [[ ! -z ${VERBOSE+x} ]]; then
set -x
fi
CLUSTER_URL="$1"
# Setup the DC/OS CLI
## Point it to the DC/OS cluster. CLUSTER_URL is the URL of the admin dashboard
dcos config set core.dcos_url "$CLUSTER_URL"
## Set the ACS token. dcos-login reads GH_USERNAME and GH_PASSWORD from the environment automatically
dcos config set core.dcos_acs_token "$(dcos-login --cluster-url "$CLUSTER_URL")"