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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
9238fb1c
Commit
9238fb1c
authored
Mar 04, 2017
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set up GitLab CI to create Geo database
parent
470c491e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
1 deletion
+57
-1
.gitlab-ci.yml
.gitlab-ci.yml
+1
-1
config/database_geo.yml.mysql
config/database_geo.yml.mysql
+46
-0
scripts/prepare_build.sh
scripts/prepare_build.sh
+10
-0
No files found.
.gitlab-ci.yml
View file @
9238fb1c
...
...
@@ -26,7 +26,7 @@ before_script:
-
bundle --version
-
'
[
"$USE_BUNDLE_INSTALL"
!=
"true"
]
||
retry
bundle
install
--without
postgres
production
--jobs
$(nproc)
$FLAGS'
-
retry gem install knapsack
-
'
[
"$SETUP_DB"
!=
"true"
]
||
bundle
exec
rake
db:drop
db:create
db:schema:load
db:migrate
add_limits_mysql'
-
'
[
"$SETUP_DB"
!=
"true"
]
||
bundle
exec
rake
db:drop
db:create
db:schema:load
db:migrate
geo:db:drop
geo:db:create
geo:db:schema:load
geo:db:migrate
add_limits_mysql'
stages
:
-
prepare
...
...
config/database_geo.yml.mysql
0 → 100644
View file @
9238fb1c
# Warning: We don't support MySQL replication for GitLab Geo,
# this file is needed to run tests on GitLab CI.
#
# PRODUCTION
#
production:
adapter: mysql2
encoding: utf8
collation: utf8_general_ci
reconnect: false
database: gitlabhq_geo_production
pool: 10
username: git
password: "secure password"
# host: localhost
# socket: /tmp/mysql.sock
#
# Development specific
#
development:
adapter: mysql2
encoding: utf8
collation: utf8_general_ci
reconnect: false
database: gitlabhq_geo_development
pool: 5
username: root
password: "secure password"
# socket: /tmp/mysql.sock
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test: &test
adapter: mysql2
encoding: utf8mb4
collation: utf8mb4_general_ci
reconnect: false
database: gitlabhq_geo_test
pool: 5
username: root
password:
# socket: /tmp/mysql.sock
scripts/prepare_build.sh
View file @
9238fb1c
...
...
@@ -21,6 +21,11 @@ if [ -f /.dockerenv ] || [ -f ./dockerinit ]; then
sed
-i
's/password:.*/password:/g'
config/database.yml
sed
-i
's/# socket:.*/host: mysql/g'
config/database.yml
cp
config/database_geo.yml.mysql config/database_geo.yml
sed
-i
's/username:.*/username: root/g'
config/database_geo.yml
sed
-i
's/password:.*/password:/g'
config/database_geo.yml
sed
-i
's/# socket:.*/host: mysql/g'
config/database_geo.yml
cp
config/resque.yml.example config/resque.yml
sed
-i
's/localhost/redis/g'
config/resque.yml
...
...
@@ -32,4 +37,9 @@ else
sed
"s/username
\:
.*
$/
username
\:
runner/"
-i
config/database.yml
sed
"s/password
\:
.*
$/
password
\:
'password'/"
-i
config/database.yml
sed
"s/gitlabhq_test/gitlabhq_test_
$rnd
/"
-i
config/database.yml
cp
config/database_geo.yml.mysql config/database_geo.yml
sed
"s/username
\:
.*
$/
username
\:
runner/"
-i
config/database_geo.yml
sed
"s/password
\:
.*
$/
password
\:
'password'/"
-i
config/database_geo.yml
sed
"s/gitlabhq_test/gitlabhq_test_
$rnd
/"
-i
config/database_geo.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