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 #200 from YunoHost-Apps/testing

15.2.2
This commit is contained in:
Kayou 2022-08-03 10:54:01 +02:00 committed by GitHub
commit ed3feb49bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 60 additions and 57 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:** 15.2.0~ynh1
**Shipped version:** 15.2.2~ynh1
**Demo:** https://gitlab.com/explore

View file

@ -17,7 +17,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 :** 15.2.0~ynh1
**Version incluse :** 15.2.2~ynh1
**Démo :** https://gitlab.com/explore

View file

@ -2,7 +2,7 @@
"name": "GitLab",
"id": "gitlab",
"packaging_format": 1,
"version": "15.2.0~ynh1",
"version": "15.2.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

@ -260,6 +260,55 @@ then
# While the current version is not the last version, do an upgrade
while [ "$last_version" != "$current_version" ]
do
# 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" "15.1"; then
checkDBBackgroundMigration=2
elif 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 -ge 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 2 ] && gitlab-rails runner -e production 'puts Gitlab::Database::BackgroundMigration::BatchedMigration.queued.count' | grep -q -w 0
then
checkDBBackgroundMigration=0
elif [ $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
current_major_version=${current_version%%.*}
@ -313,52 +362,6 @@ 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="15.2.0"
gitlab_version="15.2.2"
# sha256sum found here: https://packages.gitlab.com/gitlab
gitlab_debian_version="$(lsb_release -sc)"
gitlab_x86_64_bullseye_source_sha256="6389276f340fc7992030e9da6d8689bbc064413344b3336b2c00e2082ec3ec70"
gitlab_x86_64_buster_source_sha256="6288ca86bdfcf0300a22025fd804ec4a0360a0cbfe8f82a90c510589d5effa5b"
gitlab_x86_64_bullseye_source_sha256="d2a65650a15eb25c4a0c80e09db85edb31c99f54bdee751e6201c3977bd5058e"
gitlab_x86_64_buster_source_sha256="27b1e6ea735ea64cb534b25eb1ec2b0c672002e6fac84cf610a8b13f1573775a"
gitlab_arm64_bullseye_source_sha256="5a43d9fe8d6ecb22af5bea15f29fca6c20d81c3795bc6e5999f8e37ae80c69a5"
gitlab_arm64_buster_source_sha256="8b904fe231a6a10a8991be32202c06e2446dd112b7d97a08f7aa1d24573c168b"
gitlab_arm64_bullseye_source_sha256="46f6623b254ef32ef051a472cd8718ceddf8d1a912f742a1c458aebdc513ccb1"
gitlab_arm64_buster_source_sha256="a60e28b94c3de9540e507fd4522580ff8bc0c17028f5f06cdf81dbf012115753"
gitlab_arm_buster_source_sha256="549250a4515b2f634132f5769fafc747c938995445f2738da511d55827572d61"
gitlab_arm_buster_source_sha256="33147e1ee5281a5bf2f956b8237ee0a1352dab25f3931922e7e22f110884fa00"
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="15.2.0"
gitlab_arm_buster_source_sha256="549250a4515b2f634132f5769fafc747c938995445f2738da511d55827572d61"
gitlab_version="15.2.2"
gitlab_arm_buster_source_sha256="33147e1ee5281a5bf2f956b8237ee0a1352dab25f3931922e7e22f110884fa00"
fi
gitlab_source_sha256=$gitlab_arm_buster_source_sha256
fi