summaryrefslogtreecommitdiff
path: root/doc/ci/update/4.2-to-4.3.md
blob: f340cb61411909f17c31e07698e39093ae3e7bbd (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Update from 4.2 to 4.3

## GitLab CI 4.x requires GitLab 6.3 or higher

### 1. stop CI server

    sudo service gitlab_ci stop

### 2. Switch to your gitlab_ci user

```
sudo su gitlab_ci
cd /home/gitlab_ci/gitlab-ci
```

### 3. get latest code

```
git fetch
git checkout 4-3-stable
```

### 4. Install libs, migrations etc

Edit web server settings

```
cp config/unicorn.rb.example config/unicorn.rb
editor config/unicorn.rb
```

Then:

```
# For MySQL users
bundle install --without postgres development test --deployment

# For Postgres users
bundle install --without mysql development test --deployment

# Run migrations
bundle exec rake db:migrate RAILS_ENV=production
```

### 5. Setup unicorn
```
cp config/unicorn.rb.example config/unicorn.rb
```

### 6. Install the new init script
As a user with sudo rights:

```
cd /home/gitlab_ci/gitlab-ci
sudo cp lib/support/init.d/gitlab_ci /etc/init.d/gitlab_ci
sudo chmod +x /etc/init.d/gitlab_ci
```

### 7. Start web application

    sudo service gitlab_ci start