gitlab-org--gitlab-foss/scripts/prepare_build.sh

27 lines
585 B
Bash
Raw Normal View History

#!/bin/sh
2016-03-09 20:22:25 +00:00
retry() {
2016-06-07 11:06:24 +00:00
if eval "$@"; then
return 0
fi
for i in 2 1; do
sleep 3s
echo "Retrying $i..."
2016-03-09 20:22:25 +00:00
if eval "$@"; then
return 0
fi
done
return 1
}
cp config/database.yml.mysql config/database.yml
sed -i 's/username:.*/username: root/g' config/database.yml
sed -i 's/password:.*/password:/g' config/database.yml
sed -i 's/# socket:.*/host: mysql/g' config/database.yml
cp config/resque.yml.example config/resque.yml
sed -i 's/localhost/redis/g' config/resque.yml
export FLAGS="--path vendor --retry 3 --quiet"