waja ревизий этого фрагмента 9 years ago. К ревизии
1 file changed, 1 insertion
gitlab_source_minor_version_update.sh
| @@ -40,6 +40,7 @@ sudo -u git -H git checkout `cat /home/git/gitlab/GITLAB_WORKHORSE_VERSION` -b ` | |||
| 40 | 40 | # install libs, migrations, etc. | |
| 41 | 41 | cd /home/git/gitlab | |
| 42 | 42 | sudo -u git -H bundle install --without development test ${BUNDLE_EXCLUDE} --deployment | |
| 43 | + | sudo -u git -H bundle clean | |
| 43 | 44 | sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production | |
| 44 | 45 | sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS_ENV=production | |
| 45 | 46 | # start application | |
Jan Wagner ревизий этого фрагмента 10 years ago. К ревизии
1 file changed, 2 insertions, 5 deletions
gitlab_source_minor_version_update.sh
| @@ -41,12 +41,9 @@ sudo -u git -H git checkout `cat /home/git/gitlab/GITLAB_WORKHORSE_VERSION` -b ` | |||
| 41 | 41 | cd /home/git/gitlab | |
| 42 | 42 | sudo -u git -H bundle install --without development test ${BUNDLE_EXCLUDE} --deployment | |
| 43 | 43 | sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production | |
| 44 | - | sudo -u git -H bundle exec rake assets:clean RAILS_ENV=production | |
| 45 | - | sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production | |
| 46 | - | sudo -u git -H bundle exec rake cache:clear RAILS_ENV=production | |
| 44 | + | sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS_ENV=production | |
| 47 | 45 | # start application | |
| 48 | 46 | sudo service gitlab start | |
| 49 | 47 | sudo service nginx restart | |
| 50 | 48 | # check application status | |
| 51 | - | sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production | |
| 52 | - | sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production | |
| 49 | + | sudo -u git -H bundle exec rake gitlab:env:info gitlab:check RAILS_ENV=production | |
Jan Wagner ревизий этого фрагмента 10 years ago. К ревизии
1 file changed, 0 insertions, 0 deletions
Пустой файл
Jan Wagner ревизий этого фрагмента 10 years ago. К ревизии
1 file changed, 1 insertion, 1 deletion
gitlab_source_minor_version_update.sh
| @@ -36,7 +36,7 @@ sudo -u git -H git checkout v`cat /home/git/gitlab/GITLAB_SHELL_VERSION` -b v`ca | |||
| 36 | 36 | # update gitlab-workhorse to the corresponding version | |
| 37 | 37 | cd /home/git/gitlab-workhorse | |
| 38 | 38 | sudo -u git -H git fetch | |
| 39 | - | sudo -u git -H git checkout `cat /home/git/gitlab/GITLAB_WORKHORSE_VERSION` -b `cat /home/git/gitlab/GITLAB_WORKHORSE_VERSION` | |
| 39 | + | sudo -u git -H git checkout `cat /home/git/gitlab/GITLAB_WORKHORSE_VERSION` -b `cat /home/git/gitlab/GITLAB_WORKHORSE_VERSION` && sudo -u git -H make | |
| 40 | 40 | # install libs, migrations, etc. | |
| 41 | 41 | cd /home/git/gitlab | |
| 42 | 42 | sudo -u git -H bundle install --without development test ${BUNDLE_EXCLUDE} --deployment | |
Jan Wagner ревизий этого фрагмента 10 years ago. К ревизии
1 file changed, 5 insertions, 1 deletion
gitlab_source_minor_version_update.sh
| @@ -33,6 +33,10 @@ sudo -u git -H git checkout $LATEST_TAG -b $LATEST_TAG | |||
| 33 | 33 | cd /home/git/gitlab-shell | |
| 34 | 34 | sudo -u git -H git fetch | |
| 35 | 35 | sudo -u git -H git checkout v`cat /home/git/gitlab/GITLAB_SHELL_VERSION` -b v`cat /home/git/gitlab/GITLAB_SHELL_VERSION` | |
| 36 | + | # update gitlab-workhorse to the corresponding version | |
| 37 | + | cd /home/git/gitlab-workhorse | |
| 38 | + | sudo -u git -H git fetch | |
| 39 | + | sudo -u git -H git checkout `cat /home/git/gitlab/GITLAB_WORKHORSE_VERSION` -b `cat /home/git/gitlab/GITLAB_WORKHORSE_VERSION` | |
| 36 | 40 | # install libs, migrations, etc. | |
| 37 | 41 | cd /home/git/gitlab | |
| 38 | 42 | sudo -u git -H bundle install --without development test ${BUNDLE_EXCLUDE} --deployment | |
| @@ -45,4 +49,4 @@ sudo service gitlab start | |||
| 45 | 49 | sudo service nginx restart | |
| 46 | 50 | # check application status | |
| 47 | 51 | sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production | |
| 48 | - | sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production | |
| 52 | + | sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production | |
waja ревизий этого фрагмента 10 years ago. К ревизии
1 file changed, 48 insertions
gitlab_source_minor_version_update.sh(файл создан)
| @@ -0,0 +1,48 @@ | |||
| 1 | + | #!/bin/sh | |
| 2 | + | if [ -z "${1}" ] | |
| 3 | + | then | |
| 4 | + | echo "Specify which database are you using: [ --mysql | --postgresql ]" | |
| 5 | + | exit 0 | |
| 6 | + | fi | |
| 7 | + | case ${1} in | |
| 8 | + | --mysql) | |
| 9 | + | BUNDLE_EXCLUDE="postgres" | |
| 10 | + | ;; | |
| 11 | + | --postgresql) | |
| 12 | + | BUNDLE_EXCLUDE="mysql" | |
| 13 | + | ;; | |
| 14 | + | *) | |
| 15 | + | echo "Specify which database are you using: [ --mysql | --postgresql ]" | |
| 16 | + | exit 0 | |
| 17 | + | ;; | |
| 18 | + | esac | |
| 19 | + | ||
| 20 | + | # backup | |
| 21 | + | cd /home/git/gitlab | |
| 22 | + | sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production | |
| 23 | + | # stop server | |
| 24 | + | sudo service gitlab stop | |
| 25 | + | # get latest code from stable branch | |
| 26 | + | cd /home/git/gitlab | |
| 27 | + | sudo -u git -H git fetch --all | |
| 28 | + | sudo -u git -H git checkout -- Gemfile.lock db/schema.rb | |
| 29 | + | LATEST_TAG=$(git tag -l 'v*.[0-9]' --sort='v:refname'| tail -1) | |
| 30 | + | #LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`) | |
| 31 | + | sudo -u git -H git checkout $LATEST_TAG -b $LATEST_TAG | |
| 32 | + | # updating git-shell to corresponding version | |
| 33 | + | cd /home/git/gitlab-shell | |
| 34 | + | sudo -u git -H git fetch | |
| 35 | + | sudo -u git -H git checkout v`cat /home/git/gitlab/GITLAB_SHELL_VERSION` -b v`cat /home/git/gitlab/GITLAB_SHELL_VERSION` | |
| 36 | + | # install libs, migrations, etc. | |
| 37 | + | cd /home/git/gitlab | |
| 38 | + | sudo -u git -H bundle install --without development test ${BUNDLE_EXCLUDE} --deployment | |
| 39 | + | sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production | |
| 40 | + | sudo -u git -H bundle exec rake assets:clean RAILS_ENV=production | |
| 41 | + | sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production | |
| 42 | + | sudo -u git -H bundle exec rake cache:clear RAILS_ENV=production | |
| 43 | + | # start application | |
| 44 | + | sudo service gitlab start | |
| 45 | + | sudo service nginx restart | |
| 46 | + | # check application status | |
| 47 | + | sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production | |
| 48 | + | sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production | |