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

Testing
This commit is contained in:
Kayou 2023-10-02 21:55:45 +02:00 committed by GitHub
commit 4e92111cff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 197 additions and 47 deletions

View file

@ -18,7 +18,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:** 16.3.0~ynh1
**Shipped version:** 16.4.1~ynh1
**Demo:** https://gitlab.com/explore
@ -31,7 +31,6 @@ Git-repository manager providing wiki, issue-tracking and CI/CD pipeline feature
* Official app website: <https://gitlab.com>
* Official admin documentation: <https://docs.gitlab.com/>
* Upstream app code repository: <https://gitlab.com/gitlab-org/omnibus-gitlab - https://gitlab.com/gitlab-org/gitlab>
* YunoHost documentation for this app: <https://yunohost.org/app_gitlab>
* Report a bug: <https://github.com/YunoHost-Apps/gitlab_ynh/issues>
## Developer info

View file

@ -18,7 +18,7 @@ Si vous navez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po
Gestionnaire de dépôts Git proposant des fonctionnalités de wiki, suivi de bugs et de pipeline CI/CD
**Version incluse :** 16.3.0~ynh1
**Version incluse :** 16.4.1~ynh1
**Démo :** https://gitlab.com/explore
@ -31,7 +31,6 @@ Gestionnaire de dépôts Git proposant des fonctionnalités de wiki, suivi de bu
* Site officiel de lapp : <https://gitlab.com>
* Documentation officielle de ladmin : <https://docs.gitlab.com/>
* Dépôt de code officiel de lapp : <https://gitlab.com/gitlab-org/omnibus-gitlab - https://gitlab.com/gitlab-org/gitlab>
* Documentation YunoHost pour cette app : <https://yunohost.org/app_gitlab>
* Signaler un bug : <https://github.com/YunoHost-Apps/gitlab_ynh/issues>
## Informations pour les développeurs

View file

@ -898,7 +898,14 @@ gitlab_rails['gitlab_shell_ssh_port'] = __SSH_PORT__
# gitlab_rails['redis_repository_cache_username'] = nil
# gitlab_rails['redis_repository_cache_password'] = nil
# gitlab_rails['redis_repository_cache_cluster_nodes'] = nil
# gitlab_rails['redis_workhorse_instance'] = nil
# gitlab_rails['redis_workhorse_sentinels'] = nil
# gitlab_rails['redis_workhorse_sentinels_password'] = nil
# gitlab_rails['redis_workhorse_username'] = nil
# gitlab_rails['redis_workhorse_password'] = nil
# gitlab_rails['redis_workhorse_cluster_nodes'] = nil
# gitlab_rails['redis_workhorse_sentinel_master'] = nil
# gitlab_rails['redis_yml_override'] = nil
@ -949,6 +956,7 @@ gitlab_rails['gitlab_shell_ssh_port'] = __SSH_PORT__
# registry['validation_enabled'] = false
# registry['autoredirect'] = false
# registry['compatibility_schema1_enabled'] = false
# registry['database'] = nil
### Registry backend storage
###! Docs: https://docs.gitlab.com/ee/administration/packages/container_registry.html#configure-storage-for-the-container-registry
@ -965,6 +973,29 @@ gitlab_rails['gitlab_shell_ssh_port'] = __SSH_PORT__
# }
# }
### Registry database
###! Docs: https://docs.gitlab.com/ee/administration/packages/container_registry.html?tab=Linux+package+%28Omnibus%29#configure-a-metadata-database-for-the-container-registry
# registry['database'] = {
# 'enabled' => true,
# 'host' => 'localhost',
# 'port' => 5432,
# 'user' => 'postgres',
# 'password' => 'postgres',
# 'dbname' => 'registry',
# 'sslmode' => 'verify-full',
# 'sslcert' => '/path/to/client.crt',
# 'sslkey' => '/path/to/client.key',
# 'sslrootcert' => '/path/to/root.crt',
# 'connecttimeout' => '5s',
# 'draintimeout' => '2m',
# 'preparedstatements' => false,
# 'pool' => {
# 'maxidle' => 25,
# 'maxopen' => 25,
# 'maxlifetime' => '5m'
# }
# }
### Registry notifications endpoints
# registry['notifications'] = [
# {
@ -2327,14 +2358,16 @@ nginx['listen_https'] = false
# postgres_exporter['home'] = '/var/opt/gitlab/postgres-exporter'
# postgres_exporter['log_directory'] = '/var/log/gitlab/postgres-exporter'
# postgres_exporter['log_group'] = nil
# postgres_exporter['flags'] = {}
# postgres_exporter['flags'] = {
# 'collector.stat_user_tables' => false,
# 'collector.postmaster' => true
# }
# postgres_exporter['listen_address'] = 'localhost:9187'
# postgres_exporter['env_directory'] = '/opt/gitlab/etc/postgres-exporter/env'
# postgres_exporter['env'] = {
# 'SSL_CERT_DIR' => "/opt/gitlab/embedded/ssl/certs/"
# }
# postgres_exporter['sslmode'] = nil
# postgres_exporter['per_table_stats'] = false
##! Service name used to register Postgres Exporter as a Consul service
# postgres_exporter['consul_service_name'] = 'postgres-exporter'
@ -3177,7 +3210,8 @@ package['modify_kernel_parameters'] = __MODIFY_KERNEL_PARAMETERS__
# consul['configuration'] = {
# 'client_addr' => nil,
# 'datacenter' => 'gitlab_consul',
# 'enable_script_checks' => true,
# 'enable_script_checks' => false,
# 'enable_local_script_checks' => true,
# 'server' => false
# }
# consul['services'] = []

View file

@ -5,7 +5,7 @@ name = "GitLab"
description.en = "Git-repository manager providing wiki, issue-tracking and CI/CD pipeline features"
description.fr = "Gestionnaire de dépôts Git proposant des fonctionnalités de wiki, suivi de bugs et de pipeline CI/CD"
version = "16.3.0~ynh1"
version = "16.4.1~ynh1"
maintainers = ["kay0u"]

View file

@ -148,21 +148,49 @@ then
source $YNH_APP_BASEDIR/scripts/upgrade.d/upgrade.last.sh
last_version=$gitlab_version
source_current_major_version () {
source_next_version () {
# We start with the upgrade.$current_major_version.first.sh
if [ -e "$YNH_APP_BASEDIR/scripts/upgrade.d/upgrade.$current_major_version.first.sh" ]; then
source $YNH_APP_BASEDIR/scripts/upgrade.d/upgrade.$current_major_version.first.sh
elif [ -e "$YNH_APP_BASEDIR/scripts/upgrade.d/upgrade.$current_major_version.last.sh" ]; then
if dpkg --compare-versions "$gitlab_version" "gt" "$current_version"; then
return
fi
fi
# Then upgrade to all minor versions
for minor_verion in $(ls $YNH_APP_BASEDIR/scripts/upgrade.d/upgrade.$current_major_version* | grep -v -E ".first.sh$|.last.sh$" | sed -e "s@$YNH_APP_BASEDIR/scripts/upgrade.d/upgrade.$current_major_version.@@" -e "s/.sh$//" | sort)
do
source $YNH_APP_BASEDIR/scripts/upgrade.d/upgrade.$current_major_version.$minor_verion.sh
if dpkg --compare-versions "$gitlab_version" "gt" "$current_version"
then
return
fi
done
# Then end with upgrade.$current_major_version.last.sh
if [ -e "$YNH_APP_BASEDIR/scripts/upgrade.d/upgrade.$current_major_version.last.sh" ]; then
source $YNH_APP_BASEDIR/scripts/upgrade.d/upgrade.$current_major_version.last.sh
# Finish with the last migration if the file doesn't exist
if dpkg --compare-versions "$gitlab_version" "gt" "$current_version"
then
return
fi
else
source $YNH_APP_BASEDIR/scripts/upgrade.d/upgrade.last.sh
if dpkg --compare-versions "$gitlab_version" "gt" "$current_version"
then
return
fi
fi
# Increment the major version to upgrade to the next version
if dpkg --compare-versions "$gitlab_version" "le" "$current_version"; then
current_major_version=$(($current_major_version + 1))
source_next_version
fi
}
# To update GitLab from major version A to B, we have to go to the last minor version
# of the major version A and then go to the first minor version of the major version B
# to finally go to the current minor version of the major version B
# A.last -> B.first -> B.last
# To upgrade GitLab from a major version A to a major version B,
# we need to follow a specific path described here https://gitlab-com.gitlab.io/support/toolbox/upgrade-path/
# A.last -> B.first -> -> B.X -> B.Y -> B.last
# While the current version is not the last version, do an upgrade
while [ "$last_version" != "$current_version" ]
@ -219,22 +247,9 @@ then
current_major_version=${current_version%%.*}
source_current_major_version
source_next_version
# if the version stored in the upgrade.$current_major_version.first.sh file is less than or equal
# to the current version, and if the version stored in the upgrade.$current_major_version.last.sh file
# increment the major version to upgrade to the next version
if dpkg --compare-versions "$gitlab_version" "le" "$current_version"; then
if [ -e "$YNH_APP_BASEDIR/scripts/upgrade.d/upgrade.$current_major_version.last.sh" ]; then
source $YNH_APP_BASEDIR/scripts/upgrade.d/upgrade.$current_major_version.last.sh
else
source $YNH_APP_BASEDIR/scripts/upgrade.d/upgrade.last.sh
fi
if dpkg --compare-versions "$gitlab_version" "le" "$current_version"; then
current_major_version=$(($current_major_version + 1))
source_current_major_version
fi
fi
ynh_print_info --message="Upgrade from ${current_version} to ${gitlab_version}"
ynh_add_config --template="$YNH_APP_BASEDIR/conf/$architecture.src.default" --destination="$YNH_APP_BASEDIR/conf/$architecture.src"

View file

@ -0,0 +1,48 @@
#!/bin/bash
gitlab_version="15.4.6"
# sha256sum found here: https://packages.gitlab.com/gitlab
gitlab_debian_version="$(lsb_release -sc)"
gitlab_x86_64_bullseye_source_sha256="1e328997adb13fca9fb829218d6556c14065d9889997e6b7330f554cf812455a"
gitlab_x86_64_buster_source_sha256="9fd1cc1fde6dbc1ec3c5528eea74f57c355f098ed26d5ad914ce30e2acd5764e"
gitlab_arm64_bullseye_source_sha256="fff8625d2cbdb45bc3d90e4414ac6b4b9023a24526ab73f0f86d7177e3129915"
gitlab_arm64_buster_source_sha256="3c35b28717a06b17ce7854c76d0ab35dc73554061ad3881170be68b072a53cf7"
gitlab_arm_buster_source_sha256="33a60e701921117542de771b8c0e2c83c7cbd2730f199e4c88c8adc6eb1c4579"
architecture=$(ynh_app_setting_get --app="$app" --key=architecture)
if [ "$architecture" = "x86-64" ]; then
if [ "$gitlab_debian_version" = "bullseye" ]
then
gitlab_source_sha256=$gitlab_x86_64_bullseye_source_sha256
elif [ "$gitlab_debian_version" = "buster" ]
then
gitlab_source_sha256=$gitlab_x86_64_buster_source_sha256
fi
elif [ "$architecture" = "arm64" ]; then
if [ "$gitlab_debian_version" = "bullseye" ]
then
gitlab_source_sha256=$gitlab_arm64_bullseye_source_sha256
elif [ "$gitlab_debian_version" = "buster" ]
then
gitlab_source_sha256=$gitlab_arm64_buster_source_sha256
fi
elif [ "$architecture" = "arm" ]; then
gitlab_source_sha256=$gitlab_arm_buster_source_sha256
fi
gitlab_filename="gitlab-ce-${gitlab_version}.deb"
# Action to do in case of failure of the package_check
package_check_action() {
ynh_backup_if_checksum_is_different --file="$config_path/gitlab.rb"
cat <<EOF >> "$config_path/gitlab.rb"
# Last chance to fix Gitlab
package['modify_kernel_parameters'] = false
EOF
ynh_store_file_checksum --file="$config_path/gitlab.rb"
}

View file

@ -0,0 +1,55 @@
#!/bin/bash
gitlab_version="16.3.5"
# sha256sum found here: https://packages.gitlab.com/gitlab
gitlab_debian_version="$(lsb_release -sc)"
gitlab_x86_64_bullseye_source_sha256="80bf49ae846133f7a19267b494024a4010e64839829262ef5241f1fb585dc60c"
gitlab_x86_64_buster_source_sha256="ae216aa3e1831b928fe8a0a543cc3734e3ac3d6191d7eb5111f061f38b67e36c"
gitlab_arm64_bullseye_source_sha256="e38a2347f1b0c6af3dcac5cc5746b37db7059c9e8d4c82efaa90bcc7f8532f4e"
gitlab_arm64_buster_source_sha256="98bf7cc6ad9c339d90f6fd3e6ad90431b14c9817269278a5de6eff6a652264ca"
gitlab_arm_buster_source_sha256="b4fe665d35674a641755eb5d966cd4b05877c9149ba27a629960e82465432dda"
gitlab_arm_bullseye_source_sha256="b37e5318c90822d2ded46b604f7976c8b4a54764df5c937d48d6360d864531fe"
architecture=$(ynh_app_setting_get --app="$app" --key=architecture)
if [ "$architecture" = "x86-64" ]; then
if [ "$gitlab_debian_version" = "bullseye" ]
then
gitlab_source_sha256=$gitlab_x86_64_bullseye_source_sha256
elif [ "$gitlab_debian_version" = "buster" ]
then
gitlab_source_sha256=$gitlab_x86_64_buster_source_sha256
fi
elif [ "$architecture" = "arm64" ]; then
if [ "$gitlab_debian_version" = "bullseye" ]
then
gitlab_source_sha256=$gitlab_arm64_bullseye_source_sha256
elif [ "$gitlab_debian_version" = "buster" ]
then
gitlab_source_sha256=$gitlab_arm64_buster_source_sha256
fi
elif [ "$architecture" = "arm" ]; then
if [ "$gitlab_debian_version" = "bullseye" ]
then
gitlab_source_sha256=$gitlab_arm_bullseye_source_sha256
elif [ "$gitlab_debian_version" = "buster" ]
then
gitlab_source_sha256=$gitlab_arm_buster_source_sha256
fi
fi
gitlab_filename="gitlab-ce-${gitlab_version}.deb"
# Action to do in case of failure of the package_check
package_check_action() {
ynh_backup_if_checksum_is_different --file="$config_path/gitlab.rb"
cat <<EOF >> "$config_path/gitlab.rb"
# Last chance to fix Gitlab
package['modify_kernel_parameters'] = false
EOF
ynh_store_file_checksum --file="$config_path/gitlab.rb"
}

View file

@ -1,18 +1,18 @@
#!/bin/bash
gitlab_version="16.0.0"
gitlab_version="16.1.5"
# sha256sum found here: https://packages.gitlab.com/gitlab
gitlab_debian_version="$(lsb_release -sc)"
gitlab_x86_64_bullseye_source_sha256="1c933d51068f67442de5b01d30869e0854c9199d24910cda43103d2fa49700b5"
gitlab_x86_64_buster_source_sha256="a91533c586e02441393fdb4560d5b7a9852beb339f683c26a9c85e098405e84c"
gitlab_x86_64_bullseye_source_sha256="da5a3eac413c2c1646bdec1fceed170fb0c77f4ebb61beae16fb2d84e3d14d63"
gitlab_x86_64_buster_source_sha256="f74e92fe2ebfc31d2b04aff606876cf3881912ef10ccf440ca74c486059f41dd"
gitlab_arm64_bullseye_source_sha256="90425b49427b46d8c5dbb09187baf76dbdf372f177f27d6e31b9717cd60849cc"
gitlab_arm64_buster_source_sha256="1393b8fb9498f4ead75aad69d89f9ba6e9281f3619f071f3efeebf72d2d6829f"
gitlab_arm64_bullseye_source_sha256="d6a660b057cf7621d6edd01458790b49582abe54d0e8b69024d37380d3d8a6ab"
gitlab_arm64_buster_source_sha256="370f54e6a14732397ecd050b3e582ee766cb43475c08da56516e77de20af1d1f"
gitlab_arm_buster_source_sha256="821bf4d6cf9f12373dc89d7ec757f3546a94a339ad5c1f044d102b9468e840b6"
gitlab_arm_bullseye_source_sha256="2bb0c4145d467c2d79a9067f090ace1b967318a49dc34e969d5abc06040d111e"
gitlab_arm_buster_source_sha256="0ce903f3bd83ee7aa5e12649422ce42f75700167564c008fa2a57f831c42f55e"
gitlab_arm_bullseye_source_sha256="ead7cec3a747d30ca20fb251f07c42636a86a3f35eae4d5ebebc8a20f8843832"
architecture=$(ynh_app_setting_get --app="$app" --key=architecture)

View file

@ -1,22 +1,22 @@
#!/bin/bash
gitlab_version="16.3.0"
gitlab_version="16.4.1"
# Upgrade path: https://gitlab-com.gitlab.io/support/toolbox/upgrade-path/
# sha256sum found here: https://packages.gitlab.com/gitlab
gitlab_debian_version="$(lsb_release -sc)"
gitlab_x86_64_bookworm_source_sha256="a8ad48f975a51edd47156a097554ad145cb6ca7458e7e2625a395db10c3a2e67"
gitlab_x86_64_bullseye_source_sha256="c768c9f82ffc5a9a11074970627c5f832eb416e5290ba878c7a4989900f1702a"
gitlab_x86_64_buster_source_sha256="89a5fb54f1e4ea27541e86e629916b5223db43c3582a52201d70f26fad649b52"
gitlab_x86_64_bookworm_source_sha256="df3b33056545cf5fe4924bfd0095a6522ef71eee625e9401d44501f305c9c5a9"
gitlab_x86_64_bullseye_source_sha256="7dd3d47f77f349497ef93f686686c3a778e318393ec2917775faa6fe1afb650e"
gitlab_x86_64_buster_source_sha256="83ac8ea1fc5e9e85e9da10860a7fbd43da80754f74dce3b7323ac65a846907fb"
gitlab_arm64_bookworm_source_sha256="04a1b984b1b29ffe4ce1cbc7b4bb7b206de70552f4322d3bc9a2013ae2c641ec"
gitlab_arm64_bullseye_source_sha256="05d418d7d736af480dea73955175bf1e2becdfdb1a7467e4e3ffa86b55b29f31"
gitlab_arm64_buster_source_sha256="96d0aebf79d0f8efd630ef4a05d9e48f7a4436e600fd24ad312da8d8527f285b"
gitlab_arm64_bookworm_source_sha256="de2119bd329c1e62565e73471075303ff08e1632375f3e4e9b7930552f19ff2e"
gitlab_arm64_bullseye_source_sha256="dc981cb85db2b2661a18dc55611bedede4df0b7b3699195723fd0fbb3ada47b8"
gitlab_arm64_buster_source_sha256="2ccb99c2ed16121730735a037d288ec3d72385151a0461c2b9893ec458d1310a"
gitlab_arm_bookworm_source_sha256=""
gitlab_arm_bullseye_source_sha256="50ca0bdc687bfab76cd117dcc9dffa6ce6496c00e962c4e8f21354f74ed952f3"
gitlab_arm_buster_source_sha256="2a4e6e6708e0310251e3af71d670861ab8b787a12c7916b25c79b54b373b4f87"
gitlab_arm_bullseye_source_sha256="e86dbe38bae3488f40ea6c1d2405ba632af687b1d410902d6fe1c4a6e943883f"
gitlab_arm_buster_source_sha256="f59e68495d2916992e3f91216f38d489367abb2061fad22a38d9b4ecc969a7aa"
architecture=$(ynh_app_setting_get --app="$app" --key=architecture)

View file

@ -5,4 +5,4 @@ test_format = 1.0
# Commits to test upgrade from
# -------------------------------
test_upgrade_from.722fa8db9d8d840064ffc64338e1170da7cafc37.name = "Upgrade from 15.0.0"
test_upgrade_from.7b4758b323155c5b31287250dbe696cdf295a52c.name = "Upgrade from 16.1.1"