summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-06-18 12:42:39 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-06-18 12:42:39 +0000
commitdb915f7aba456bbff935f0cc0ad294dbc4dfd71b (patch)
tree9323fa83dd06c5b864a929475218c4cea22c3c3f /scripts
parent0e615a486398166956ac612e1558abd1d44e1f8f (diff)
parent0abd565305940c21378c58336fbb63826642ec06 (diff)
downloadgitlab-ce-db915f7aba456bbff935f0cc0ad294dbc4dfd71b.tar.gz
Merge branch 'build_script' into 'master'
Add a build preparation script, modify gitlab.ci.yml to use the script. Updated the .gitlab-ci.yml to use a script which contains build preparation for runners which might run docker images with CI runner. Regular builds should be not affected. See merge request !834
Diffstat (limited to 'scripts')
-rw-r--r--scripts/prepare_build.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/scripts/prepare_build.sh b/scripts/prepare_build.sh
new file mode 100644
index 00000000000..5525ab77435
--- /dev/null
+++ b/scripts/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