Skip to content

Commit

Permalink
uat.sh: allow NO_INSTALL=1 flag in create (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
blockloop authored Jan 14, 2019
1 parent e3e649f commit e0ecd80
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions scripts/uat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@

set -ue

# optional parameters
# disable installation of the agent
NO_INSTALL=${NO_INSTALL:-0}

# team context in the URL of the browser
CONTEXT=14661f
OS=$(uname | tr '[:upper:]' '[:lower:]')
Expand Down Expand Up @@ -223,12 +227,11 @@ function command_scp() {

for ip in $(list_ips); do
# shellcheck disable=SC2029
scp "$src" root@"${ip}":"$dest" &
scp -o "UserKnownHostsFile=/dev/null" -o "StrictHostKeyChecking=no" "$src" root@"${ip}":"$dest" &
done
wait
}


# ssh to all debian-based droplets (ubuntu/debian) and execute a command
function exec_deb() {
[ -z "$*" ] && abort "Usage: $0 exec_deb <command>"
Expand Down Expand Up @@ -289,8 +292,12 @@ function create_image() {
echo "Creating image $image..."
fi

user_data=${USER_DATA_RPM}
[[ "$image" =~ debian|ubuntu ]] && user_data=${USER_DATA_DEB}
user_data=""

if [ "${NO_INSTALL}" == "0" ]; then
user_data=${USER_DATA_RPM}
[[ "$image" =~ debian|ubuntu ]] && user_data=${USER_DATA_DEB}
fi

body=$(mktemp)
cat <<EOF > "$body"
Expand Down

0 comments on commit e0ecd80

Please sign in to comment.