diff options
author | Marin Jankovski <maxlazio@gmail.com> | 2015-03-27 17:46:03 -0700 |
---|---|---|
committer | Marin Jankovski <maxlazio@gmail.com> | 2015-03-27 17:46:03 -0700 |
commit | 1db18654767d9b79f62e69474e889e5c0ac839d7 (patch) | |
tree | a875a451b00f5f118f7eb88f0cad578330ff3c7d /doc | |
parent | 54e320ee63421ba42a15706a6b4892c502951d44 (diff) | |
download | gitlab-ci-1db18654767d9b79f62e69474e889e5c0ac839d7.tar.gz |
Add example for setting up ruby env using the cookbook-gitlab-test.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/examples/README.md | 7 | ||||
-rw-r--r-- | doc/examples/configure/ruby.md | 26 |
2 files changed, 31 insertions, 2 deletions
diff --git a/doc/examples/README.md b/doc/examples/README.md index a33a19a..531a8f1 100644 --- a/doc/examples/README.md +++ b/doc/examples/README.md @@ -25,6 +25,9 @@ The build command is run from [GitlabCi::Build#command](https://gitlab.com/gitla + [Build script GitLab CE](build_script_gitlab_ce.md) + [Build script for Sencha deploy PhoneGapBuild](build_script_sencha_deploy_phonegapbuild.md) -# Configuring a runner example +# Configuring runner examples -+ [Configure a runner to run the GitLab CE test suite](configure_a_runner_to_run_the_gitlab_ce_test_suite.md) ++ [For GitLab CE](configure_a_runner_to_run_the_gitlab_ce_test_suite.md) ++ [For Ruby](configure/ruby.md) + +We welcome contributions of examples for other environments. diff --git a/doc/examples/configure/ruby.md b/doc/examples/configure/ruby.md new file mode 100644 index 0000000..466e87e --- /dev/null +++ b/doc/examples/configure/ruby.md @@ -0,0 +1,26 @@ +# Example configuring runner for Ruby + +In this example, we configure ruby and mysql for testing environment: + +``` +# as root +( +set -e +apt-get update +apt-get upgrade -y +apt-get install -y curl +cd /root +rm -rf cookbooks cookbook-gitlab-test.git +curl 'https://gitlab.com/gitlab-org/cookbook-gitlab-test/repository/archive.tar.gz?ref=master' | tar -xvz +mkdir cookbooks +mv cookbook-gitlab-test.git cookbooks/cookbook-gitlab-test +curl -L https://www.chef.io/chef/install.sh | bash +chef-client -z -r 'recipe[cookbook-gitlab-test::ruby], recipe[cookbook-gitlab-test::mysql]' +) + +### Register your runner instance with a GitLab CI Coordinator +sudo /opt/gitlab-runner/bin/setup -C /home/gitlab-runner + +# Restart the gitlab-runner Upstart script +sudo service gitlab-runner restart +``` |