diff options
author | Valery Sizov <valery@gitlab.com> | 2015-05-05 10:00:55 +0000 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2015-05-05 10:00:55 +0000 |
commit | 3c4d6044886a5f38b8f1f99eac601842e640d867 (patch) | |
tree | 096efc7fa909aa72d260366c26bcc1f328d8743e /doc | |
parent | 38416584ba3b414c769dfb64701926b92858b3f1 (diff) | |
parent | 47a0b3b41a6c54e0b7013f437bb0ea0eb41cd2af (diff) | |
download | gitlab-ci-3c4d6044886a5f38b8f1f99eac601842e640d867.tar.gz |
Merge branch 'update_build_script' into 'master'
Update the build script example used by GitLab B.V. to support both docker and shell executors.
Updated build examples for GitLab CE to be able to used with either Docker or regular shell executors.
See merge request !92
Diffstat (limited to 'doc')
-rw-r--r-- | doc/examples/build_script_gitlab_ce.md | 38 |
1 files changed, 29 insertions, 9 deletions
diff --git a/doc/examples/build_script_gitlab_ce.md b/doc/examples/build_script_gitlab_ce.md index 8b28d49..167a675 100644 --- a/doc/examples/build_script_gitlab_ce.md +++ b/doc/examples/build_script_gitlab_ce.md @@ -1,25 +1,45 @@ Build script to run the tests of GitLab CE ================================= -These script can be run to tests of GitLab CE on a [configured](configure_a_runner_to_run_the_gitlab_ce_test_suite.md) runner. - # Build script used at ci.gitlab.org to test the private GitLab B.V. repo at dev.gitlab.org +This build script can run both with the docker or shell executor in [gitlab-ci-multi-runner](https://gitlab.com/gitlab-org/gitlab-ci-multi-runner). + +If you are using a shell executor, runner must be configured to have mysql and ruby, see a [configuration example](https://gitlab.com/gitlab-org/gitlab-ci/blob/master/doc/examples/configure/ruby.md). + ```bash -export PATH=$HOME/bin:/usr/local/bin:/usr/bin:/bin +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: postgres/g' config/database.yml + + cp config/resque.yml.example config/resque.yml + sed -i 's/localhost/redis/g' config/resque.yml +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 + ruby -v which ruby gem install bundler --no-ri --no-rdoc -cp config/database.yml.mysql config/database.yml 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 exec rake db:create RAILS_ENV=test + +bundle install --without postgres production --jobs $(nproc) --path .bundle +RAILS_ENV=test bundle exec rake db:create RAILS_ENV=test SIMPLECOV=true bundle exec rake test ``` |