Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
d9042e8b
Commit
d9042e8b
authored
Mar 09, 2016
by
Kamil Trzciński
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'retry-bundle' into 'master'
Retry bundler and apt-get See merge request !3146
parents
8e3485d8
3da55e37
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
13 deletions
+15
-13
.gitlab-ci.yml
.gitlab-ci.yml
+2
-2
scripts/prepare_build.sh
scripts/prepare_build.sh
+13
-11
No files found.
.gitlab-ci.yml
View file @
d9042e8b
...
@@ -19,11 +19,11 @@ before_script:
...
@@ -19,11 +19,11 @@ before_script:
-
source ./scripts/prepare_build.sh
-
source ./scripts/prepare_build.sh
-
ruby -v
-
ruby -v
-
which ruby
-
which ruby
-
gem install bundler --no-ri --no-rdoc
-
retry
gem install bundler --no-ri --no-rdoc
-
cp config/gitlab.yml.example config/gitlab.yml
-
cp config/gitlab.yml.example config/gitlab.yml
-
touch log/application.log
-
touch log/application.log
-
touch log/test.log
-
touch log/test.log
-
bundle install --without postgres production --jobs $(nproc) "${FLAGS[@]}"
-
retry
bundle install --without postgres production --jobs $(nproc) "${FLAGS[@]}"
-
RAILS_ENV=test bundle exec rake db:drop db:create db:schema:load db:migrate
-
RAILS_ENV=test bundle exec rake db:drop db:create db:schema:load db:migrate
stages
:
stages
:
...
...
scripts/prepare_build.sh
View file @
d9042e8b
#!/bin/bash
#!/bin/bash
retry
()
{
for
i
in
$(
seq
1 3
)
;
do
if
eval
"
$@
"
;
then
return
0
fi
sleep
3s
echo
"Retrying..."
done
return
1
}
if
[
-f
/.dockerinit
]
;
then
if
[
-f
/.dockerinit
]
;
then
mkdir
-p
vendor
mkdir
-p
vendor
...
@@ -12,17 +23,8 @@ if [ -f /.dockerinit ]; then
...
@@ -12,17 +23,8 @@ if [ -f /.dockerinit ]; then
popd
popd
# Try to install packages
# Try to install packages
for
i
in
$(
seq
1 3
)
;
do
retry
'apt-get update -yqqq; apt-get -o dir::cache::archives="vendor/apt" install -y -qq --force-yes \
apt-get update
-yqqq
||
true
libicu-dev libkrb5-dev cmake nodejs postgresql-client mysql-client unzip'
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
sleep
3s
echo
"Retrying package installation..."
done
cp
config/database.yml.mysql config/database.yml
cp
config/database.yml.mysql config/database.yml
sed
-i
's/username:.*/username: root/g'
config/database.yml
sed
-i
's/username:.*/username: root/g'
config/database.yml
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment