Skip to content
Snippets Groups Projects
Select Git revision
  • test-coverage
  • ci-docs
  • master default
  • 8-1-stable
  • 8-0-stable
  • migrate-tables-to-ci-prefix
  • 7-14-stable
  • rs-rspec3
  • 7-13-stable
  • redis-cache
  • testbranchjob
  • update-gems
  • 7-12-stable
  • update_doc
  • lint_url_fix
  • 7-11-stable
  • travis-ci
  • 7-10-stable
  • backup
  • ci_forking
  • v8.1.0.rc2
  • v8.1.0.rc1
  • v8.0.5
  • v8.0.4
  • v8.0.3
  • v8.0.2
  • v8.0.1
  • v8.0.0
  • v8.0.0.rc4
  • v8.0.0.rc3
  • v8.0.0.rc2
  • v8.0.0.rc1
  • v7.14.3
  • v7.14.2
  • v7.14.1
  • v7.14.0
  • v7.14.0.rc3
  • v7.14.0.rc2
  • v7.14.0.rc1
  • v7.13.5
40 results

patch_versions.md

Code owners
Assign users and groups as approvers for specific file changes. Learn more.

Universal update guide for patch versions. For example from 4.0.0 to 4.0.1, also see the semantic versioning specification.

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 pull origin STABLE_BRANCH

4. Install libs, migrations etc

bundle install --without development test --deployment
bundle exec rake db:migrate RAILS_ENV=production

5. Start web application

sudo service gitlab_ci start

One line upgrade command

You have read through the entire guide and probably already did all the steps one by one.

Here is a one line command with all above steps for the next time you upgrade:

    sudo service gitlab_ci stop && \
      cd /home/gitlab_ci/gitlab-ci && \
      sudo -u gitlab_ci -H git pull origin `git rev-parse --abbrev-ref HEAD` && \
      sudo -u gitlab_ci -H bundle install --without development test --deployment && \
      sudo -u gitlab_ci -H bundle exec rake db:migrate RAILS_ENV=production && \
      cd && \
      sudo service gitlab_ci start

Since when we start this gitlab_ci service, the document db/schema.rb is shown always as modified for git, you could even do like this, if and only if, you are sure you only have that modification:

    sudo service gitlab_ci stop && \
      cd /home/gitlab_ci/gitlab-ci && \
      sudo -u gitlab_ci -H git checkout -f `git rev-parse --abbrev-ref HEAD` && \
      sudo -u gitlab_ci -H git pull origin `git rev-parse --abbrev-ref HEAD` && \
      sudo -u gitlab_ci -H bundle install --without development test --deployment && \
      sudo -u gitlab_ci -H bundle exec rake db:migrate RAILS_ENV=production && \
      cd && \
      sudo service gitlab_ci start