summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2016-01-29 14:27:10 +0100
committerJames Lopez <james@jameslopez.es>2016-01-29 14:27:10 +0100
commit7ca6779654ed2da5ba31ab9256406feb1b7fb8ee (patch)
tree8c3d1e2eb642b667c9e46babdc786a4d4dc3c789 /scripts
parent4d2da5fd2585fead823c4450e54613dadf882c0d (diff)
parentf5860ce6466bf8934bc01254351bffd005dfeafe (diff)
downloadgitlab-ce-7ca6779654ed2da5ba31ab9256406feb1b7fb8ee.tar.gz
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into fix/atom-url-issue
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/ci/prepare_build.sh22
-rwxr-xr-xscripts/prepare_build.sh16
2 files changed, 11 insertions, 27 deletions
diff --git a/scripts/ci/prepare_build.sh b/scripts/ci/prepare_build.sh
deleted file mode 100755
index 864a683a1bd..00000000000
--- a/scripts/ci/prepare_build.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/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
diff --git a/scripts/prepare_build.sh b/scripts/prepare_build.sh
index 119cc90fc1e..5987988dc8e 100755
--- a/scripts/prepare_build.sh
+++ b/scripts/prepare_build.sh
@@ -1,10 +1,16 @@
#!/bin/bash
+
if [ -f /.dockerinit ]; then
- wget -q https://gitlab.com/axil/phantomjs-debian/raw/master/phantomjs_1.9.8-0jessie_amd64.deb
- dpkg -i phantomjs_1.9.8-0jessie_amd64.deb
+ # Docker runners use `/cache` folder which is persisted every build
+ if [ ! -e /cache/phantomjs_1.9.8-0jessie_amd64.deb ]; then
+ wget -q https://gitlab.com/axil/phantomjs-debian/raw/master/phantomjs_1.9.8-0jessie_amd64.deb
+ mv phantomjs_1.9.8-0jessie_amd64.deb /cache
+ fi
+ dpkg -i /cache/phantomjs_1.9.8-0jessie_amd64.deb
apt-get update -qq
- apt-get install -y -qq libicu-dev libkrb5-dev cmake nodejs postgresql-client mysql-client
+ apt-get -o dir::cache::archives="/cache/apt" install -y -qq --force-yes \
+ libicu-dev libkrb5-dev cmake nodejs postgresql-client mysql-client unzip
cp config/database.yml.mysql config/database.yml
sed -i 's/username:.*/username: root/g' config/database.yml
@@ -13,8 +19,8 @@ if [ -f /.dockerinit ]; then
cp config/resque.yml.example config/resque.yml
sed -i 's/localhost/redis/g' config/resque.yml
- FLAGS=(--deployment --path /cache)
- export FLAGS
+
+ export FLAGS=(--path /cache)
else
export PATH=$HOME/bin:/usr/local/bin:/usr/bin:/bin
cp config/database.yml.mysql config/database.yml