summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-08-25 18:42:46 -0700
committerDouwe Maan <douwe@gitlab.com>2015-08-25 18:42:46 -0700
commit046b28312704f3131e72dcd2dbdacc5264d4aa62 (patch)
treea8c2b14a6e1db3b662fee2c79af70d9fcb643c2e /scripts
parente449426a4e7d15cdd582d4f136add52cbfb5e04e (diff)
downloadgitlab-ce-046b28312704f3131e72dcd2dbdacc5264d4aa62.tar.gz
Groundwork for merging CI into CE
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/ci/prepare_build.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/scripts/ci/prepare_build.sh b/scripts/ci/prepare_build.sh
new file mode 100755
index 00000000000..864a683a1bd
--- /dev/null
+++ b/scripts/ci/prepare_build.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+if [ -f /.dockerinit ]; then
+ export FLAGS=(--deployment --path /cache)
+
+ apt-get update -qq
+ apt-get install -y -qq nodejs
+
+ 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
+
+ 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
+else
+ export PATH=$HOME/bin:/usr/local/bin:/usr/bin:/bin
+
+ cp config/database.yml.mysql config/database.yml
+ sed -i "s/username\:.*$/username\: runner/" config/database.yml
+ sed -i "s/password\:.*$/password\: 'password'/" config/database.yml
+ sed -i "s/gitlab_ci_test/gitlab_ci_test_$((RANDOM/5000))/" config/database.yml
+fi