summaryrefslogtreecommitdiff
path: root/bin/prepare_build.sh
diff options
context:
space:
mode:
authorMarin Jankovski <maxlazio@gmail.com>2015-06-17 12:23:43 +0200
committerMarin Jankovski <maxlazio@gmail.com>2015-06-17 12:23:43 +0200
commitb6688f830b5e83ed670f061e619f96487ac8a6a2 (patch)
tree92bdfc20c33fbbb08d7513077b56540267d2de3e /bin/prepare_build.sh
parent4f582a14b76ca1e064a55fd6d06c26c23f7ad0f8 (diff)
downloadgitlab-ce-b6688f830b5e83ed670f061e619f96487ac8a6a2.tar.gz
Add a build preparation script, modify gitlab.ci.yml to use the script.
Diffstat (limited to 'bin/prepare_build.sh')
-rwxr-xr-xbin/prepare_build.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/bin/prepare_build.sh b/bin/prepare_build.sh
new file mode 100755
index 00000000000..5525ab77435
--- /dev/null
+++ b/bin/prepare_build.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+if [ -f /.dockerinit ]; then
+ wget -q http://ftp.de.debian.org/debian/pool/main/p/phantomjs/phantomjs_1.9.0-1+b1_amd64.deb
+ dpkg -i phantomjs_1.9.0-1+b1_amd64.deb
+
+ apt-get update -qq
+ apt-get install -y -qq libicu-dev libkrb5-dev cmake nodejs
+
+ 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
+ FLAGS=(--deployment --path /cache)
+ export FLAGS
+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