-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.run
executable file
·42 lines (38 loc) · 1.08 KB
/
.travis.run
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
set -e -x -u
sudo mkdir -p /var/vcap/packages
sudo mkdir -p /var/vcap/store
sudo chown -R $USER /var/vcap
echo $FOLDER_NAME
echo ${WARDENIZED_SERVICE:=} # default to empty
echo ${REQUIRE_PACKAGE:=}
if [ $WARDENIZED_SERVICE ]
then
./start_warden.sh
fi
if [ $REQUIRE_PACKAGE ]
then
echo 'Downloading required packages'
# Cloudfront is linked to vcap-services-binaries.s3.amazonaws.com in Lobot AWS account
time curl -Ss http://d28jy99omrpiak.cloudfront.net/$REQUIRE_PACKAGE -o $REQUIRE_PACKAGE
#time curl -Ss http://vcap-services-binaries.s3.amazonaws.com/$REQUIRE_PACKAGE -o $REQUIRE_PACKAGE
echo 'Installing required packages'
tar xf $REQUIRE_PACKAGE -C /
rm -f $REQUIRE_PACKAGE
fi
cd $FOLDER_NAME
failure=0
rvmsudo gem install bundler --no-ri --no-rdoc
rvmsudo bundle install --local && rvmsudo bundle exec rake spec --trace || failure=$?
sudo pkill -f ruby || true
if [[ $failure -ne 0 ]]; then
if [[ -d tmp/log ]]; then
for file in $(ls tmp/log/*); do
echo ""
echo "<====== $file ======>"
echo ""
cat $file
done
fi
fi
exit $failure