mirror of
https://github.com/YunoHost-Apps/gitlab_ynh.git
synced 2024-09-03 18:36:35 +02:00
wait migrations
This commit is contained in:
parent
2d9b99aaf0
commit
8a5095f166
1 changed files with 11 additions and 2 deletions
|
@ -286,8 +286,7 @@ then
|
|||
|
||||
ynh_setup_source --dest_dir=$tempdir --source_id=$architecture
|
||||
|
||||
if ! ynh_exec_warn_less dpkg -i $tempdir/$gitlab_filename ;
|
||||
then # This command will fail in lxc env
|
||||
if ! ynh_exec_warn_less dpkg -i $tempdir/$gitlab_filename; then # This command will fail in lxc env
|
||||
package_check_action # defined in upgrade.d/upgrade.X.sh
|
||||
ynh_exec_warn_less dpkg --configure gitlab-ce
|
||||
fi
|
||||
|
@ -314,6 +313,16 @@ then
|
|||
ynh_secure_remove --file="/tmp/gitlab_upgrade_$current_version.log"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# https://docs.gitlab.com/ee/update/#checking-for-background-migrations-before-upgrading
|
||||
if dpkg --compare-versions "$current_version" "ge" "12.9"; then
|
||||
while ! gitlab-rails runner -e production 'puts Gitlab::BackgroundMigration.remaining'
|
||||
do
|
||||
ynh_print_info --message="Wait for the migration in the background to finish"
|
||||
sleep 1
|
||||
done
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue