aboutsummaryrefslogtreecommitdiffstats
path: root/script/test-vagrant-provisioning
blob: 62862f3df1878046a9d82dc5ff1b64fbfcef9574 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash
 
OS=$1
 
vagrant destroy
 
ALAVETELI_VAGRANT_OS="$OS" vagrant up &&
  vagrant ssh -c "cd /home/vagrant/alaveteli && bundle exec rails s --daemon" &&
  sleep 10 &&
  curl -I http://10.10.10.30:3000

if [[ $? -ne 0 ]]
then
  echo "Failed with exit code $?"
  exit 1
else
  echo "Success!"
  exit 0
fi