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
Jérome Perrin
gitlab-ce
Commits
b6688f83
Commit
b6688f83
authored
Jun 17, 2015
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a build preparation script, modify gitlab.ci.yml to use the script.
parent
4f582a14
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
10 deletions
+28
-10
.gitlab-ci.yml
.gitlab-ci.yml
+4
-10
bin/prepare_build.sh
bin/prepare_build.sh
+24
-0
No files found.
.gitlab-ci.yml
View file @
b6688f83
# This file is generated by GitLab CI
before_script
:
-
export PATH=$HOME/bin:/usr/local/bin:/usr/bin:/bin
-
./bin/build_prepare.sh
-
ruby -v
-
which ruby
-
gem install bundler
-
which bundle
-
echo $PATH
-
cp config/database.yml.mysql config/database.yml
-
gem install bundler --no-ri --no-rdoc
-
cp config/gitlab.yml.example config/gitlab.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
-
touch log/application.log
-
touch log/test.log
-
bundle install --without postgres production --jobs $(nproc)
-
bundle install --without postgres production --jobs $(nproc)
"${FLAGS[@]}"
-
bundle exec rake db:create RAILS_ENV=test
Rspec
:
script
:
...
...
@@ -48,4 +42,4 @@ Brakeman:
-
bundle exec rake brakeman
tags
:
-
ruby
-
mysql
\ No newline at end of file
-
mysql
bin/prepare_build.sh
0 → 100755
View file @
b6688f83
#!/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
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