From 1db18654767d9b79f62e69474e889e5c0ac839d7 Mon Sep 17 00:00:00 2001 From: Marin Jankovski Date: Fri, 27 Mar 2015 17:46:03 -0700 Subject: [PATCH 1/3] Add example for setting up ruby env using the cookbook-gitlab-test. --- doc/examples/README.md | 7 +++++-- doc/examples/configure/ruby.md | 26 ++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 doc/examples/configure/ruby.md diff --git a/doc/examples/README.md b/doc/examples/README.md index a33a19a84..531a8f13f 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 000000000..466e87eee --- /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 +``` From 7880447b524e9736a443ce1f7c7ef08f2641fa65 Mon Sep 17 00:00:00 2001 From: Marin Jankovski Date: Fri, 27 Mar 2015 18:03:15 -0700 Subject: [PATCH 2/3] Remove the file for configuring a runner to run gitlab ce. --- doc/examples/README.md | 4 +++- .../configure_a_runner_to_run_the_gitlab_ce_test_suite.md | 6 ------ 2 files changed, 3 insertions(+), 7 deletions(-) delete mode 100644 doc/examples/configure_a_runner_to_run_the_gitlab_ce_test_suite.md diff --git a/doc/examples/README.md b/doc/examples/README.md index 531a8f13f..bfb5b5462 100644 --- a/doc/examples/README.md +++ b/doc/examples/README.md @@ -27,7 +27,9 @@ The build command is run from [GitlabCi::Build#command](https://gitlab.com/gitla # Configuring runner examples -+ [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. + +Please see [cookbook-gitlab-test](https://gitlab.com/gitlab-org/cookbook-gitlab-test/blob/master/README.md) +for instructions how to prepare a server to run CI tests for GitLab. diff --git a/doc/examples/configure_a_runner_to_run_the_gitlab_ce_test_suite.md b/doc/examples/configure_a_runner_to_run_the_gitlab_ce_test_suite.md deleted file mode 100644 index 0ddab5204..000000000 --- a/doc/examples/configure_a_runner_to_run_the_gitlab_ce_test_suite.md +++ /dev/null @@ -1,6 +0,0 @@ -## Configure a runner to run the GitLab CE test suite - -Please see -[cookbook-gitlab-test](https://gitlab.com/gitlab-org/cookbook-gitlab-test/blob/master/README.md) -for instructions how to prepare a server to run CI tests for GitLab. The actual -[build script](build_script_gitlab_ce.md) is separate. From d08de03b69b4cba3b48af120861cdbdf4170ff1a Mon Sep 17 00:00:00 2001 From: Marin Jankovski Date: Fri, 27 Mar 2015 18:06:37 -0700 Subject: [PATCH 3/3] Move contribution mention to list. --- doc/examples/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/examples/README.md b/doc/examples/README.md index bfb5b5462..a0d3c5356 100644 --- a/doc/examples/README.md +++ b/doc/examples/README.md @@ -28,8 +28,7 @@ The build command is run from [GitlabCi::Build#command](https://gitlab.com/gitla # Configuring runner examples + [For Ruby](configure/ruby.md) - -We welcome contributions of examples for other environments. ++ We welcome contributions of examples for other environments. Please see [cookbook-gitlab-test](https://gitlab.com/gitlab-org/cookbook-gitlab-test/blob/master/README.md) for instructions how to prepare a server to run CI tests for GitLab.