2015-06-17 06:23:43 -04:00
|
|
|
#!/bin/bash
|
2016-01-22 12:16:59 -05:00
|
|
|
|
2015-06-17 06:23:43 -04:00
|
|
|
if [ -f /.dockerinit ]; then
|
2016-02-06 19:57:04 -05:00
|
|
|
mkdir -p vendor
|
|
|
|
if [ ! -e vendor/phantomjs_1.9.8-0jessie_amd64.deb ]; then
|
2016-01-22 12:16:59 -05:00
|
|
|
wget -q https://gitlab.com/axil/phantomjs-debian/raw/master/phantomjs_1.9.8-0jessie_amd64.deb
|
2016-02-06 19:57:04 -05:00
|
|
|
mv phantomjs_1.9.8-0jessie_amd64.deb vendor/
|
2016-01-22 12:16:59 -05:00
|
|
|
fi
|
2016-02-06 19:57:04 -05:00
|
|
|
dpkg -i vendor/phantomjs_1.9.8-0jessie_amd64.deb
|
2015-06-17 06:23:43 -04:00
|
|
|
|
|
|
|
apt-get update -qq
|
2016-02-06 19:57:04 -05:00
|
|
|
apt-get -o dir::cache::archives="vendor/apt" install -y -qq --force-yes \
|
2016-01-25 04:56:56 -05:00
|
|
|
libicu-dev libkrb5-dev cmake nodejs postgresql-client mysql-client unzip
|
2015-06-17 06:23:43 -04:00
|
|
|
|
|
|
|
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
|
2016-01-22 12:16:59 -05:00
|
|
|
|
2016-02-06 19:57:04 -05:00
|
|
|
export FLAGS=(--path vendor)
|
2015-06-17 06:23:43 -04:00
|
|
|
else
|
|
|
|
export PATH=$HOME/bin:/usr/local/bin:/usr/bin:/bin
|
|
|
|
cp config/database.yml.mysql config/database.yml
|
|
|
|
sed "s/username\:.*$/username\: runner/" -i config/database.yml
|
|
|
|
sed "s/password\:.*$/password\: 'password'/" -i config/database.yml
|
|
|
|
sed "s/gitlabhq_test/gitlabhq_test_$((RANDOM/5000))/" -i config/database.yml
|
|
|
|
fi
|