diff options
author | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2016-03-09 16:20:35 +0100 |
---|---|---|
committer | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2016-03-09 16:20:35 +0100 |
commit | 3eb7ea49feaf9341b2eec6eb0c58ae2f0aa37864 (patch) | |
tree | 51d965da0b5ed8dcf81ecb4c81c4867274cc248f /scripts/prepare_build.sh | |
parent | a12319c111be3963b61f0d85ceaabd1d1414f645 (diff) | |
parent | 5956ddd8b2a633bd9ff1664bcad74e2d17eeebd0 (diff) | |
download | gitlab-ce-3eb7ea49feaf9341b2eec6eb0c58ae2f0aa37864.tar.gz |
Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce into redis-config-parser
Diffstat (limited to 'scripts/prepare_build.sh')
-rwxr-xr-x | scripts/prepare_build.sh | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/scripts/prepare_build.sh b/scripts/prepare_build.sh index b6f076a90c3..82de51a9a2e 100755 --- a/scripts/prepare_build.sh +++ b/scripts/prepare_build.sh @@ -2,15 +2,27 @@ if [ -f /.dockerinit ]; then mkdir -p vendor - if [ ! -e vendor/phantomjs_1.9.8-0jessie_amd64.deb ]; then + + # Install phantomjs package + pushd vendor + if [ ! -e 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 vendor/ fi - dpkg -i vendor/phantomjs_1.9.8-0jessie_amd64.deb + dpkg -i phantomjs_1.9.8-0jessie_amd64.deb + popd + + # Try to install packages + for i in $(seq 1 3); do + apt-get update -yqqq || true + + if apt-get -o dir::cache::archives="vendor/apt" install -y -qq --force-yes \ + libicu-dev libkrb5-dev cmake nodejs postgresql-client mysql-client unzip; then + break + fi - apt-get update -qq - apt-get -o dir::cache::archives="vendor/apt" install -y -qq --force-yes \ - libicu-dev libkrb5-dev cmake nodejs postgresql-client mysql-client unzip + sleep 3s + echo "Retrying package installation..." + done cp config/database.yml.mysql config/database.yml sed -i 's/username:.*/username: root/g' config/database.yml @@ -20,7 +32,7 @@ if [ -f /.dockerinit ]; then cp config/resque.yml.example config/resque.yml sed -i 's/localhost/redis/g' config/resque.yml - export FLAGS=(--path vendor) + export FLAGS=(--path vendor --retry 3) else export PATH=$HOME/bin:/usr/local/bin:/usr/bin:/bin cp config/database.yml.mysql config/database.yml |