diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-08-25 18:42:46 -0700 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-08-25 18:42:46 -0700 |
commit | 046b28312704f3131e72dcd2dbdacc5264d4aa62 (patch) | |
tree | a8c2b14a6e1db3b662fee2c79af70d9fcb643c2e /doc/ci/update | |
parent | e449426a4e7d15cdd582d4f136add52cbfb5e04e (diff) | |
download | gitlab-ce-046b28312704f3131e72dcd2dbdacc5264d4aa62.tar.gz |
Groundwork for merging CI into CE
Diffstat (limited to 'doc/ci/update')
-rw-r--r-- | doc/ci/update/3.0-to-3.1.md | 30 | ||||
-rw-r--r-- | doc/ci/update/3.1-to-3.2.md | 30 | ||||
-rw-r--r-- | doc/ci/update/3.2-to-4.0.md | 35 | ||||
-rw-r--r-- | doc/ci/update/4.0-to-4.1.md | 49 | ||||
-rw-r--r-- | doc/ci/update/4.1-to-4.2.md | 47 | ||||
-rw-r--r-- | doc/ci/update/4.2-to-4.3.md | 61 | ||||
-rw-r--r-- | doc/ci/update/4.3-to-5.0.md | 42 | ||||
-rw-r--r-- | doc/ci/update/5.0-to-5.1.md | 42 | ||||
-rw-r--r-- | doc/ci/update/5.1-to-5.2.md | 42 | ||||
-rw-r--r-- | doc/ci/update/5.2-to-5.3.md | 42 | ||||
-rw-r--r-- | doc/ci/update/5.3-to-5.4.md | 60 | ||||
-rw-r--r-- | doc/ci/update/5.4-to-7.8.md | 65 | ||||
-rw-r--r-- | doc/ci/update/7.10-to-7.11.md | 45 | ||||
-rw-r--r-- | doc/ci/update/7.11-to-7.12.md | 67 | ||||
-rw-r--r-- | doc/ci/update/7.12-to-7.13.md | 63 | ||||
-rw-r--r-- | doc/ci/update/7.8-to-7.9.md | 66 | ||||
-rw-r--r-- | doc/ci/update/7.9-to-7.10.md | 49 | ||||
-rw-r--r-- | doc/ci/update/README.md | 2 | ||||
-rw-r--r-- | doc/ci/update/patch_versions.md | 59 |
19 files changed, 896 insertions, 0 deletions
diff --git a/doc/ci/update/3.0-to-3.1.md b/doc/ci/update/3.0-to-3.1.md new file mode 100644 index 00000000000..039e781a6c8 --- /dev/null +++ b/doc/ci/update/3.0-to-3.1.md @@ -0,0 +1,30 @@ +# Update from 3.0 to 3.1 + +### 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 3-1-stable +``` + +### 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 diff --git a/doc/ci/update/3.1-to-3.2.md b/doc/ci/update/3.1-to-3.2.md new file mode 100644 index 00000000000..dc6ab6514c6 --- /dev/null +++ b/doc/ci/update/3.1-to-3.2.md @@ -0,0 +1,30 @@ +# Update from 3.1 to 3.2 + +### 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 3-2-stable +``` + +### 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 diff --git a/doc/ci/update/3.2-to-4.0.md b/doc/ci/update/3.2-to-4.0.md new file mode 100644 index 00000000000..50c26e49224 --- /dev/null +++ b/doc/ci/update/3.2-to-4.0.md @@ -0,0 +1,35 @@ +# Update from 3.2 to 4.0 + +## GitLab CI 4.0 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-0-stable +``` + +### 4. Install libs, migrations etc + +``` +bundle install --without development test --deployment +bundle exec rake db:migrate RAILS_ENV=production +bundle exec whenever -w +``` + +### 5. Start web application + + sudo service gitlab_ci start + +### 6. Update your runners to version 4.0 diff --git a/doc/ci/update/4.0-to-4.1.md b/doc/ci/update/4.0-to-4.1.md new file mode 100644 index 00000000000..e749b324ee7 --- /dev/null +++ b/doc/ci/update/4.0-to-4.1.md @@ -0,0 +1,49 @@ +# Update from 4.0 to 4.1 + +## 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-1-stable +``` + +### 4. Install libs, migrations etc + +``` +# 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 + +# Update cron +bundle exec whenever -w +``` + +### 5. Start web application + + sudo service gitlab_ci start + +### 6. Make sure your runners are version 4.0 + + + cd path_to_runner + cat VERSION + +To update runners follow this instructions https://github.com/gitlabhq/gitlab-ci-runner#update diff --git a/doc/ci/update/4.1-to-4.2.md b/doc/ci/update/4.1-to-4.2.md new file mode 100644 index 00000000000..81394aa216e --- /dev/null +++ b/doc/ci/update/4.1-to-4.2.md @@ -0,0 +1,47 @@ +# Update from 4.1 to 4.2 + +## 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-2-stable +``` + +### 4. Install libs, migrations etc + +``` +# 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. 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 +``` + +### 6. Start web application + + sudo service gitlab_ci start diff --git a/doc/ci/update/4.2-to-4.3.md b/doc/ci/update/4.2-to-4.3.md new file mode 100644 index 00000000000..f340cb61411 --- /dev/null +++ b/doc/ci/update/4.2-to-4.3.md @@ -0,0 +1,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 diff --git a/doc/ci/update/4.3-to-5.0.md b/doc/ci/update/4.3-to-5.0.md new file mode 100644 index 00000000000..23327eac608 --- /dev/null +++ b/doc/ci/update/4.3-to-5.0.md @@ -0,0 +1,42 @@ +# Update from 4.3 to 5.0 + +__GitLab CI 5.0 requires GitLab 6.3 or higher and GitLab CI Runner v5__ + +### 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 5-0-stable +``` + +#### Redis config + +If you have `config/resque.yml` file - please update it with recent `config/resque.yml.example` + +### 4. Install libs, migrations etc + +``` +# 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. Start web application + + sudo service gitlab_ci start
\ No newline at end of file diff --git a/doc/ci/update/5.0-to-5.1.md b/doc/ci/update/5.0-to-5.1.md new file mode 100644 index 00000000000..9a37a87a882 --- /dev/null +++ b/doc/ci/update/5.0-to-5.1.md @@ -0,0 +1,42 @@ +# Update from 5.0 to 5.1 + +__GitLab CI 5.1 requires GitLab 6.3 or higher and GitLab CI Runner v5__ + +### 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 5-1-stable +``` + +#### Redis config + +If you have `config/resque.yml` file - please update it with recent `config/resque.yml.example` + +### 4. Install libs, migrations etc + +``` +# 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. Start web application + + sudo service gitlab_ci start
\ No newline at end of file diff --git a/doc/ci/update/5.1-to-5.2.md b/doc/ci/update/5.1-to-5.2.md new file mode 100644 index 00000000000..6dcf00276f6 --- /dev/null +++ b/doc/ci/update/5.1-to-5.2.md @@ -0,0 +1,42 @@ +# Update from 5.1 to 5.2 + +__GitLab CI 5.2 requires GitLab 7.5 or higher and GitLab CI Runner v5__ + +### 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 5-2-stable +``` + +#### Redis config + +If you have `config/resque.yml` file - please update it with recent `config/resque.yml.example` + +### 4. Install libs, migrations etc + +``` +# 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. Start web application + + sudo service gitlab_ci start
\ No newline at end of file diff --git a/doc/ci/update/5.2-to-5.3.md b/doc/ci/update/5.2-to-5.3.md new file mode 100644 index 00000000000..2b70f2146ac --- /dev/null +++ b/doc/ci/update/5.2-to-5.3.md @@ -0,0 +1,42 @@ +# Update from 5.2 to 5.3 + +__GitLab CI 5.3 requires GitLab 7.5 or higher and GitLab CI Runner v5__ + +### 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 5-3-stable +``` + +#### Redis config + +If you have `config/resque.yml` file - please update it with recent `config/resque.yml.example` + +### 4. Install libs, migrations etc + +``` +# 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. Start web application + + sudo service gitlab_ci start
\ No newline at end of file diff --git a/doc/ci/update/5.3-to-5.4.md b/doc/ci/update/5.3-to-5.4.md new file mode 100644 index 00000000000..6d1cd61389a --- /dev/null +++ b/doc/ci/update/5.3-to-5.4.md @@ -0,0 +1,60 @@ +# Update from 5.3 to 5.4 + +__GitLab CI 5.4 requires GitLab 7.5 or higher and GitLab CI Runner v5__ + +### 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 5-4-stable +``` + +#### Redis config + +If you have `config/resque.yml` file - please update it with recent `config/resque.yml.example` + +### 4. Install libs, migrations etc + +``` +# 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. Update config +GitLab CI 5.4 and above make use of the OAuth2 protocol for authentication with GitLab. This means that after updating GitLab (CI), +you need to create an OAuth2 application in GitLab admin area, which gives you the APP_ID and APP_SECRET. + +For callback URL use: `http://ci.example.com/user_sessions/callback` if you use http, or `https://ci.example.com/user_sessions/callback` if you use https. + +You will have to add APP_ID and APP_SECRET to the GitLab CI config, as such: + +``` +production: + gitlab_server: + url: 'http://gitlab.example.com' + app_id: XXXXXX + app_secret: XXXXXX + +``` + + +### 6. Start web application + + sudo service gitlab_ci start diff --git a/doc/ci/update/5.4-to-7.8.md b/doc/ci/update/5.4-to-7.8.md new file mode 100644 index 00000000000..71561d047e6 --- /dev/null +++ b/doc/ci/update/5.4-to-7.8.md @@ -0,0 +1,65 @@ +# Update from 5.3 to 7.8 + +## Notice + +With this release we are bumping the GitLab CI version to 7.8 in order to be on par with the current GitLab version and +to avoid naming confusion. + +__GitLab CI 7.8 requires GitLab 7.8 or higher and GitLab CI Runner v5__ + +### 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 7-8-stable +``` + +#### Redis config + +If you have `config/resque.yml` file - please update it with recent `config/resque.yml.example` + +### 4. Install libs, migrations etc + +``` +# 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. Update config +GitLab CI 5.4 and above make use of the OAuth2 protocol for authentication with GitLab. This means that after updating GitLab (CI), +you need to create an OAuth2 application in GitLab admin area, which gives you the APP_ID and APP_SECRET. + +For callback URL use: `http://ci.example.com/user_sessions/callback` if you use http, or `https://ci.example.com/user_sessions/callback` if you use https. + +You will have to add APP_ID and APP_SECRET to the GitLab CI config, as such: + +``` +production: + gitlab_server: + url: 'http://gitlab.example.com' + app_id: XXXXXX + app_secret: XXXXXX + +``` + + +### 6. Start web application + + sudo service gitlab_ci start diff --git a/doc/ci/update/7.10-to-7.11.md b/doc/ci/update/7.10-to-7.11.md new file mode 100644 index 00000000000..4e04509e84d --- /dev/null +++ b/doc/ci/update/7.10-to-7.11.md @@ -0,0 +1,45 @@ +# Update from 7.10 to 7.11 + +## Notice + +__GitLab CI 7.11 requires GitLab 7.11 or higher and GitLab Multi Runner 0.3.0 and 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 7-11-stable +``` + +### 4. Install libs, migrations etc + + +``` +# Install nodejs dependency: +sudo apt-get install nodejs + +# 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. Start web application + + sudo service gitlab_ci start diff --git a/doc/ci/update/7.11-to-7.12.md b/doc/ci/update/7.11-to-7.12.md new file mode 100644 index 00000000000..ad45ea3a660 --- /dev/null +++ b/doc/ci/update/7.11-to-7.12.md @@ -0,0 +1,67 @@ +# Update from 7.11 to 7.12 + +## Notice + +__GitLab CI 7.12 requires GitLab 7.12 or higher and GitLab Multi Runner 0.4.0 or higher + +### 1. Stop CI server + + sudo service gitlab_ci stop + +### 2. Update ruby if needed + +If your ruby version is older than 2.0.0 please update it. + +Update packages: + + sudo apt-get update + sudo apt-get upgrade + +Download Ruby and compile it: + + mkdir /tmp/ruby && cd /tmp/ruby + curl --progress http://cache.ruby-lang.org/pub/ruby/ruby-2.1.6.tar.bz2 | tar xj + cd ruby-2.1.6/ + ./configure --disable-install-rdoc + make + sudo make install + +Install the Bundler Gem: + + sudo gem install bundler --no-ri --no-rdoc + +### 3. Switch to your gitlab_ci user + +``` +sudo su gitlab_ci +cd /home/gitlab_ci/gitlab-ci +``` + +### 4. Get latest code + +``` +git fetch +git checkout 7-12-stable +``` + +### 5. Install libs, migrations etc + + +``` +# Install nodejs dependency: +sudo apt-get install nodejs + +# 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 +``` + + +### 6. Start web application + + sudo service gitlab_ci start diff --git a/doc/ci/update/7.12-to-7.13.md b/doc/ci/update/7.12-to-7.13.md new file mode 100644 index 00000000000..2877c297d6f --- /dev/null +++ b/doc/ci/update/7.12-to-7.13.md @@ -0,0 +1,63 @@ +# Update from 7.12 to 7.13 + +## Notice + +__GitLab CI 7.13 requires GitLab 7.12 or higher and GitLab Multi Runner 0.5.0 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 7-13-stable +``` + +### 4. Make sure GitLab CI can write to the builds/ directory + +``` +sudo chmod -R u+rwX builds +``` + +### 4. Copy secrets + +The `secrets.yml` file is used to store keys to encrypt sessions and encrypt secure variables. +When you run migrations make sure to store it someplace safe. +Don't store it in the same place as your database backups, +otherwise your secrets are exposed if one of your backups is compromised. + +``` +sudo -u gitlab_ci -H cp config/secrets.yml.example config/secrets.yml +sudo -u gitlab_ci -H chmod 0600 config/secrets.yml +``` + +### 5. Install libs, migrations etc + + +``` +# Install nodejs dependency: +sudo apt-get install nodejs + +# 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. Start web application + + sudo service gitlab_ci start diff --git a/doc/ci/update/7.8-to-7.9.md b/doc/ci/update/7.8-to-7.9.md new file mode 100644 index 00000000000..fc1cefe9ba5 --- /dev/null +++ b/doc/ci/update/7.8-to-7.9.md @@ -0,0 +1,66 @@ +# Update from 7.8 to 7.9 + +## Notice + +__GitLab CI 7.9 requires GitLab 7.9 or higher and GitLab CI Runner v5__ + +### 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 7-9-stable +``` + +#### Redis config + +If you have `config/resque.yml` file - please update it with recent `config/resque.yml.example` + +### 4. Install libs, migrations etc + + +``` +# Install nodejs dependency: +sudo apt-get install nodejs + +# 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. Update config +GitLab CI 5.4 and above make use of the OAuth2 protocol for authentication with GitLab. This means that after updating GitLab (CI), +you need to create an OAuth2 application in GitLab admin area, which gives you the APP_ID and APP_SECRET. + +For callback URL use: `http://ci.example.com/user_sessions/callback` if you use http, or `https://ci.example.com/user_sessions/callback` if you use https. + +You will have to add APP_ID and APP_SECRET to the GitLab CI config, as such: + +``` +production: + gitlab_server: + url: 'http://gitlab.example.com' + app_id: XXXXXX + app_secret: XXXXXX + +``` + + +### 6. Start web application + + sudo service gitlab_ci start diff --git a/doc/ci/update/7.9-to-7.10.md b/doc/ci/update/7.9-to-7.10.md new file mode 100644 index 00000000000..2b54874daf4 --- /dev/null +++ b/doc/ci/update/7.9-to-7.10.md @@ -0,0 +1,49 @@ +# Update from 7.9 to 7.10 + +## Notice + +__GitLab CI 7.10 requires GitLab 7.10 or higher and GitLab CI Runner v5__ + +### 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 7-10-stable +``` + +#### Redis config + +If you have `config/resque.yml` file - please update it with recent `config/resque.yml.example` + +### 4. Install libs, migrations etc + + +``` +# Install nodejs dependency: +sudo apt-get install nodejs + +# 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. Start web application + + sudo service gitlab_ci start diff --git a/doc/ci/update/README.md b/doc/ci/update/README.md new file mode 100644 index 00000000000..7a615ef7978 --- /dev/null +++ b/doc/ci/update/README.md @@ -0,0 +1,2 @@ ++ [The indivual upgrade guides](https://gitlab.com/gitlab-org/gitlab-ci/tree/master/doc/update) ++ [Patch versions](patch_versions.md) diff --git a/doc/ci/update/patch_versions.md b/doc/ci/update/patch_versions.md new file mode 100644 index 00000000000..c13f69c03c9 --- /dev/null +++ b/doc/ci/update/patch_versions.md @@ -0,0 +1,59 @@ +# Universal update guide for patch versions. For example from 4.0.0 to 4.0.1, also see the [semantic versioning specification](http://semver.org/). + +### 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 +``` |