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
Kazuhiko Shiozaki
gitlab-ce
Commits
edf93ecb
Commit
edf93ecb
authored
Jan 22, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Speed-up docker based builds
Enable to: - Use APT cache - Use Bundler cache - Use PhantomJS cache
parent
0e51ca7c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
28 deletions
+12
-28
.gitlab-ci.yml
.gitlab-ci.yml
+1
-1
scripts/ci/prepare_build.sh
scripts/ci/prepare_build.sh
+0
-22
scripts/prepare_build.sh
scripts/prepare_build.sh
+11
-5
No files found.
.gitlab-ci.yml
View file @
edf93ecb
...
@@ -9,7 +9,7 @@ variables:
...
@@ -9,7 +9,7 @@ variables:
MYSQL_ALLOW_EMPTY_PASSWORD
:
"
1"
MYSQL_ALLOW_EMPTY_PASSWORD
:
"
1"
before_script
:
before_script
:
-
./scripts/prepare_build.sh
-
source
./scripts/prepare_build.sh
-
ruby -v
-
ruby -v
-
which ruby
-
which ruby
-
gem install bundler --no-ri --no-rdoc
-
gem install bundler --no-ri --no-rdoc
...
...
scripts/ci/prepare_build.sh
deleted
100755 → 0
View file @
0e51ca7c
#!/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
scripts/prepare_build.sh
View file @
edf93ecb
#!/bin/bash
#!/bin/bash
if
[
-f
/.dockerinit
]
;
then
if
[
-f
/.dockerinit
]
;
then
# 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
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
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 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
\
libicu-dev libkrb5-dev cmake nodejs postgresql-client mysql-client
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
...
@@ -13,8 +19,8 @@ if [ -f /.dockerinit ]; then
...
@@ -13,8 +19,8 @@ if [ -f /.dockerinit ]; then
cp
config/resque.yml.example config/resque.yml
cp
config/resque.yml.example config/resque.yml
sed
-i
's/localhost/redis/g'
config/resque.yml
sed
-i
's/localhost/redis/g'
config/resque.yml
FLAGS
=(
--deployment
--path
/cache
)
export
FLAGS
export
FLAGS
=(
--path
/cache
)
else
else
export
PATH
=
$HOME
/bin:/usr/local/bin:/usr/bin:/bin
export
PATH
=
$HOME
/bin:/usr/local/bin:/usr/bin:/bin
cp
config/database.yml.mysql config/database.yml
cp
config/database.yml.mysql 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