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
0a1b4db6
Commit
0a1b4db6
authored
May 11, 2018
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only setup db in the first checkout!
parent
7650e4de
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
14 deletions
+19
-14
.gitlab-ci.yml
.gitlab-ci.yml
+7
-6
scripts/prepare_build.sh
scripts/prepare_build.sh
+1
-8
scripts/utils.sh
scripts/utils.sh
+11
-0
No files found.
.gitlab-ci.yml
View file @
0a1b4db6
...
@@ -323,6 +323,7 @@ stages:
...
@@ -323,6 +323,7 @@ stages:
<<
:
*dedicated-no-docs-and-no-qa-pull-cache-job
<<
:
*dedicated-no-docs-and-no-qa-pull-cache-job
variables
:
variables
:
CREATE_DB_USER
:
"
true"
CREATE_DB_USER
:
"
true"
SETUP_DB
:
"
false"
script
:
script
:
-
git fetch https://gitlab.com/gitlab-org/gitlab-ee.git v9.3.0-ee
-
git fetch https://gitlab.com/gitlab-org/gitlab-ee.git v9.3.0-ee
-
git checkout -f FETCH_HEAD
-
git checkout -f FETCH_HEAD
...
@@ -331,7 +332,7 @@ stages:
...
@@ -331,7 +332,7 @@ stages:
-
cp config/gitlab.yml.example config/gitlab.yml
-
cp config/gitlab.yml.example config/gitlab.yml
-
bundle exec rake db:drop db:create db:schema:load db:seed_fu
-
bundle exec rake db:drop db:create db:schema:load db:seed_fu
-
date
-
date
-
git checkout $CI_COMMIT_SHA
-
git checkout
-f
$CI_COMMIT_SHA
-
bundle install $BUNDLE_INSTALL_FLAGS
-
bundle install $BUNDLE_INSTALL_FLAGS
-
date
-
date
-
. scripts/prepare_build.sh
-
. scripts/prepare_build.sh
...
@@ -342,16 +343,16 @@ stages:
...
@@ -342,16 +343,16 @@ stages:
<<
:
*dedicated-no-docs-and-no-qa-pull-cache-job
<<
:
*dedicated-no-docs-and-no-qa-pull-cache-job
variables
:
variables
:
CREATE_DB_USER
:
"
true"
CREATE_DB_USER
:
"
true"
SETUP_DB
:
"
false"
script
:
script
:
-
CE_HEAD=$(ruby -r./scripts/ee_specific_check/ee_specific_check -e'puts EESpecificCheck.fetch_remote_ce_branch')
-
CE_HEAD=$(ruby -r./scripts/ee_specific_check/ee_specific_check -e'puts EESpecificCheck.fetch_remote_ce_branch')
-
git checkout -f $CE_HEAD
-
git checkout -f $CE_HEAD
-
bundle install $BUNDLE_INSTALL_FLAGS
-
. scripts/utils.sh
-
. scripts/prepare_build.sh
-
date
-
date
-
cp config/gitlab.yml.example config/gitlab.yml
-
setup_db
-
bundle exec rake db:drop db:create db:schema:load db:seed_fu
-
date
-
date
-
git checkout $CI_COMMIT_SHA
-
git checkout -f $CI_COMMIT_SHA
-
bundle install $BUNDLE_INSTALL_FLAGS
-
date
-
date
-
. scripts/prepare_build.sh
-
. scripts/prepare_build.sh
-
date
-
date
...
...
scripts/prepare_build.sh
View file @
0a1b4db6
...
@@ -69,12 +69,5 @@ if [ "$CREATE_DB_USER" != "false" ]; then
...
@@ -69,12 +69,5 @@ if [ "$CREATE_DB_USER" != "false" ]; then
fi
fi
if
[
"
$SETUP_DB
"
!=
"false"
]
;
then
if
[
"
$SETUP_DB
"
!=
"false"
]
;
then
bundle
exec
rake db:drop db:create db:schema:load db:migrate
setup_db
if
[
"
$GITLAB_DATABASE
"
=
"mysql"
]
;
then
bundle
exec
rake add_limits_mysql
fi
# EE-only
bundle
exec
rake geo:db:drop geo:db:create geo:db:schema:load geo:db:migrate
fi
fi
scripts/utils.sh
View file @
0a1b4db6
...
@@ -12,3 +12,14 @@ retry() {
...
@@ -12,3 +12,14 @@ retry() {
done
done
return
1
return
1
}
}
setup_db
()
{
bundle
exec
rake db:drop db:create db:schema:load db:migrate
if
[
"
$GITLAB_DATABASE
"
=
"mysql"
]
;
then
bundle
exec
rake add_limits_mysql
fi
# EE-only
bundle
exec
rake geo:db:drop geo:db:create geo:db:schema:load geo:db:migrate
}
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