diff options
author | Valeriy Sizov <vsv2711@gmail.com> | 2015-03-16 12:47:44 +0200 |
---|---|---|
committer | Valeriy Sizov <vsv2711@gmail.com> | 2015-03-16 12:47:44 +0200 |
commit | e435a1fc6dc0f436533d58ea40d213167febef28 (patch) | |
tree | fd5e99cc300b4e0abce95c763e6dd159df2f1d09 | |
parent | 52a12893747ddac4a38dfa5becd3231e5092619c (diff) | |
parent | 6c23dbae0247de42031ffdb9b23a76711d8ae991 (diff) | |
download | gitlab-ci-e435a1fc6dc0f436533d58ea40d213167febef28.tar.gz |
Merge pull request #561 from jpahullo/issue560
issue560 - added one line upgrade command
-rw-r--r-- | doc/update/patch_versions.md | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/doc/update/patch_versions.md b/doc/update/patch_versions.md index 535b17e..c13f69c 100644 --- a/doc/update/patch_versions.md +++ b/doc/update/patch_versions.md @@ -27,3 +27,33 @@ 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 +``` |