summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorPatricio Cano <suprnova32@gmail.com>2015-09-16 19:54:18 -0500
committerPatricio Cano <suprnova32@gmail.com>2015-09-16 19:54:18 -0500
commit1ddefa3beabed00f08c893ca66b9f004e3b4e4df (patch)
tree12c0546f4246b8ee5090c32996f3301207bcf93f /scripts
parent1ef2ce95d507c3d21598f26dd8a0e77dfc3c33cf (diff)
parentcac969229aab74ab5dcd7682c4f1c3a74a17b9d6 (diff)
downloadgitlab-ce-1ddefa3beabed00f08c893ca66b9f004e3b4e4df.tar.gz
Merge branch 'master' into notification-levels
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