You should really use GitLab's packages or Docker container instead.
Feel free to use it as inspiration for your own setups, though :)
This script is purely intended for GitLab installations from source with MySQL. As such, it is only tested with that.
You should not use it on any other setup (although it might work with Postgres with some minor modifications).
The script will prompt you for the version you want to upgrade to. If you supply the same version as is currently installed, the script will assume you want to apply a patch update.
You should only upgrade from one major to the next; refrain from skipping some. So from 8-14-stable don't go to 8-16-stable right away, but first to 8-15-stable, and then 8-16-stable.
Before starting, please make sure there are no special steps required for the update in the respective update docs. If there are, apply them manually when the script is done (or, if the changes are too grave, don't use the script at all).
- Turn off GitLab before using the script with e.g.
service gitlab stop
or/etc/init.d/gitlab stop
(it should work on non-Debian-based distributions) - Login as the
git
user - Run the script
gitlab-update.sh
- If applicable, update your gitlab.yml and nginx configuration files, or the init script (the script will inform you about changes)
- Start gitlab
- ???
- Profit
The script will automatically create a backup for you if something goes wrong.
It will also pause if something goes wrong in any of the steps, so you can easily bail out.
This script is distributed under the MIT License, see LICENSE.md for the full license.