BigW Consortium Gitlab

4.1-to-4.2.md 1.14 KB
Newer Older
1
# From 4.1 to 4.2
2
*Make sure you view this [upgrade guide from the `master` branch](https://gitlab.com/gitlab-org/gitlab-ce/tree/master/doc/update/4.1-to-4.2.md) for the most up to date instructions.*
3

4
## 1. Stop server & Resque
5 6 7

    sudo service gitlab stop

8
## 2. Update code & DB
9 10

```bash
11 12 13 14

#Set the working directory
cd /home/gitlab/gitlab/

15
# Get latest code
16
sudo -u gitlab -H git fetch
17

18
sudo -u gitlab -H git checkout 4-2-stable
19

20 21 22 23 24 25 26 27 28
# The Modernizr gem was yanked from RubyGems. It is required for GitLab >= 2.8.0
# Edit `Gemfile` and change `gem "modernizr", "2.5.3"` to
# `gem "modernizr-rails", "2.7.1"``
sudo -u gitlab -H vim Gemfile

# Run a bundle install without deployment to generate the new Gemfile
sudo -u gitlab -H bundle install --without development test postgres --no-deployment

# Install libs (with deployment this time)
29
sudo -u gitlab -H bundle install --without development test postgres --deployment
30 31

# update db
32
sudo -u gitlab -H bundle exec rake db:migrate RAILS_ENV=production
33 34 35

```

36
## 3. Check GitLab's status
37 38 39 40 41

```bash
sudo -u gitlab -H bundle exec rake gitlab:check RAILS_ENV=production
```

42
## 4. Start all
43 44

    sudo service gitlab start