1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/gitlab_ynh.git synced 2024-09-03 18:36:35 +02:00

Merge pull request #188 from YunoHost-Apps/testing

Testing
This commit is contained in:
Kayou 2022-04-06 09:44:27 +02:00 committed by GitHub
commit 77847a3984
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 58 additions and 13 deletions

View file

@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
Git-repository manager providing wiki, issue-tracking and CI/CD pipeline features
**Shipped version:** 14.9.1~ynh2
**Shipped version:** 14.9.2~ynh1
**Demo:** https://gitlab.com/explore

View file

@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
Gestionnaire de dépôts Git proposant des fonctionnalités de wiki, suivi de bugs et de pipeline CI/CD
**Version incluse :** 14.9.1~ynh2
**Version incluse :** 14.9.2~ynh1
**Démo :** https://gitlab.com/explore

View file

@ -2,7 +2,7 @@
"name": "GitLab",
"id": "gitlab",
"packaging_format": 1,
"version": "14.9.1~ynh2",
"version": "14.9.2~ynh1",
"description": {
"en": "Git-repository manager providing wiki, issue-tracking and CI/CD pipeline features",
"fr": "Gestionnaire de dépôts Git proposant des fonctionnalités de wiki, suivi de bugs et de pipeline CI/CD"

View file

@ -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,52 @@ 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
checkBackgroundMigration=1
else
checkBackgroundMigration=0;
fi
if dpkg --compare-versions "$current_version" "ge" "14.0"; then
checkDBBackgroundMigration=1
else
checkDBBackgroundMigration=0;
fi
if dpkg --compare-versions "$current_version" "ge" "14.7"; then
checkBatchedBackgroundMigration=1
else
checkBatchedBackgroundMigration=0;
fi
counter=0
while [ $checkBackgroundMigration -eq 1 ] || [ $checkDBBackgroundMigration -eq 1 ] || [ $checkBatchedBackgroundMigration -eq 1 ]
do
counter=$((counter + 1))
if [ $counter -gt 1200 ]
then
ynh_print_warn --message="Timeout: a background migration runs for at least 20min !"
break
fi
if [ $checkBackgroundMigration -eq 1 ] && gitlab-rails runner -e production 'puts Gitlab::BackgroundMigration.remaining' | grep -q -w 0
then
checkBackgroundMigration=0
fi
if [ $checkDBBackgroundMigration -eq 1 ] && gitlab-rails runner -e production 'puts Gitlab::Database::BackgroundMigrationJob.pending' | wc -l | grep -q -w 0
then
checkDBBackgroundMigration=0
fi
if [ $checkBatchedBackgroundMigration -eq 1 ] && echo "select COUNT(*) from batched_background_migrations where status <> 3;" | gitlab-psql -t -A | grep -q -w 0
then
checkBatchedBackgroundMigration=0
fi
ynh_print_info --message="Wait for the migration in the background to finish"
sleep 1
done
done
fi

View file

@ -1,17 +1,17 @@
#!/bin/bash
gitlab_version="14.9.1"
gitlab_version="14.9.2"
# sha256sum found here: https://packages.gitlab.com/gitlab
gitlab_debian_version="$(lsb_release -sc)"
gitlab_x86_64_bullseye_source_sha256="c5945ec778701ed1f29d663527929102c17527e75e0a07804c2d58ae74d0786e"
gitlab_x86_64_buster_source_sha256="d1546e23522690b3f314e1edbb165d24684dd70de2c6e075a040d02b5e48dfb2"
gitlab_x86_64_bullseye_source_sha256="4a9b94edcd97f09198aeb8f64d973f0a892f6554d18afedf688ae9d1ca21e9b3"
gitlab_x86_64_buster_source_sha256="f51e05dd6d352a5b5c13e174ddf70c71c60109140b9274b77ae63c61eb701611"
gitlab_arm64_bullseye_source_sha256="6e0a03d5aa85797610ca1eea24f2bbe1c974f61e04673ad00391c7dedd236ae7"
gitlab_arm64_buster_source_sha256="f883acc3fdad0cf27080a247abd94891724d452f8e75e9f1b19a07121af702b3"
gitlab_arm64_bullseye_source_sha256="7826fad61eae70138ff06a33b3471466a11c5237c0960daecde1b94a3e694265"
gitlab_arm64_buster_source_sha256="6b4493b2d55ad6cd796036324dd1953e58ecb7ccf80dc4d02f5a4dbf0d56c8b8"
gitlab_arm_buster_source_sha256="c8fcc05aa2ede0556798b732dd823c8d7f8b153a7c6683cc2f619f014429679e"
gitlab_arm_buster_source_sha256="38033ef2cfcf23e466795a3630645a45cbc1ca771d4273e29398ec7641255ef1"
architecture=$(ynh_app_setting_get --app="$app" --key=architecture)
@ -34,8 +34,8 @@ elif [ "$architecture" = "arm64" ]; then
elif [ "$architecture" = "arm" ]; then
# If the version for arm doesn't exist, then use an older one
if [ -z "$gitlab_arm_buster_source_sha256" ]; then
gitlab_version="14.9.1"
gitlab_arm_buster_source_sha256="c8fcc05aa2ede0556798b732dd823c8d7f8b153a7c6683cc2f619f014429679e"
gitlab_version="14.9.2"
gitlab_arm_buster_source_sha256="38033ef2cfcf23e466795a3630645a45cbc1ca771d4273e29398ec7641255ef1"
fi
gitlab_source_sha256=$gitlab_arm_buster_source_sha256
fi