summaryrefslogtreecommitdiff
path: root/doc/examples/configure/ruby.md
blob: 466e87eee975e0f1578c32fffe7c00ead7dcd152 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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
```