#!/bin/bash

set -ex

export AWS_SSH_PRIVATE_KEY_PATH=$PWD/vagrant.pem
echo "$AWS_SSH_PRIVATE_KEY" > "$AWS_SSH_PRIVATE_KEY_PATH"

unzip lattice-bundle-ci/lattice-bundle-v*.zip

pushd lattice-bundle-v*/vagrant >/dev/null
  AWS_INSTANCE_NAME=ci-vagrant-aws vagrant up --provider=aws
  export $(vagrant ssh -c "grep '^DOMAIN=' /var/lattice/setup" 2>/dev/null)
popd >/dev/null

echo $DOMAIN > domain

#!/bin/bash

set -ex

export AWS_SSH_PRIVATE_KEY_PATH=$PWD/vagrant.pem
echo "$AWS_SSH_PRIVATE_KEY" > "$AWS_SSH_PRIVATE_KEY_PATH"

unzip lattice-bundle-ci/lattice-bundle-v*.zip

pushd lattice-bundle-v*/vagrant >/dev/null
  AWS_INSTANCE_NAME=ci-vagrant-aws vagrant up --provider=aws
  export $(vagrant ssh -c "grep '^DOMAIN=' /var/lattice/setup" 2>/dev/null | tr -d '\r')
popd >/dev/null

echo $DOMAIN > domain

Trim \r from end of domain variable
Trim \r from end of domain variable

[#104919732]

Signed-off-by: Stephen Levine <72d5489bdb659bea8b15ba0173fe796f11329883@pivotal.io>
