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

13.3.4
This commit is contained in:
Kayou 2020-09-21 14:02:37 +02:00 committed by GitHub
commit 2275c684e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 165 additions and 25 deletions

View file

@ -12,7 +12,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to
GitLab is a web-based Git-repository manager providing wiki, issue-tracking and CI/CD pipeline features, using an open-source license, developed by GitLab Inc. GitLab is a web-based Git-repository manager providing wiki, issue-tracking and CI/CD pipeline features, using an open-source license, developed by GitLab Inc.
**Shipped version:** 13.2.3 **Shipped version:** 13.3.4
## Screenshots ## Screenshots

View file

@ -12,7 +12,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
GitLab est un gestionnaire Web de dépôt Git fournissant des fonctionnalités de wiki, de rapports de bugs et de pipeline CI/CD. GitLab est une application open source développée par GitLab Inc. GitLab est un gestionnaire Web de dépôt Git fournissant des fonctionnalités de wiki, de rapports de bugs et de pipeline CI/CD. GitLab est une application open source développée par GitLab Inc.
**Version incluse :** 13.2.3 **Version incluse :** 13.3.4
## Captures d'écran ## Captures d'écran

View file

@ -19,8 +19,11 @@
##! This file is generated during initial installation and **is not** modified ##! This file is generated during initial installation and **is not** modified
##! during upgrades. ##! during upgrades.
##! Check out the latest version of this file to know about the different ##! Check out the latest version of this file to know about the different
##! settings that can be configured by this file, which may be found at: ##! settings that can be configured, when they were introduced and why:
##! https://gitlab.com/gitlab-org/omnibus-gitlab/raw/master/files/gitlab-config-template/gitlab.rb.template ##! https://gitlab.com/gitlab-org/omnibus-gitlab/blame/master/files/gitlab-config-template/gitlab.rb.template
##! Locally, the complete template corresponding to the installed version can be found at:
##! /opt/gitlab/etc/gitlab.rb.template
##! You can run `gitlab-ctl diff-config` to compare the contents of the current gitlab.rb with ##! You can run `gitlab-ctl diff-config` to compare the contents of the current gitlab.rb with
##! the gitlab.rb.template from the currently running version. ##! the gitlab.rb.template from the currently running version.
@ -152,6 +155,7 @@ external_url '__GENERATED_EXTERNAL_URL__'
# gitlab_rails['repository_check_worker_cron'] = "20 * * * *" # gitlab_rails['repository_check_worker_cron'] = "20 * * * *"
# gitlab_rails['admin_email_worker_cron'] = "0 0 * * 0" # gitlab_rails['admin_email_worker_cron'] = "0 0 * * 0"
# gitlab_rails['personal_access_tokens_expiring_worker_cron'] = "0 1 * * *" # gitlab_rails['personal_access_tokens_expiring_worker_cron'] = "0 1 * * *"
# gitlab_rails['personal_access_tokens_expired_notification_worker_cron'] = "0 2 * * *"
# gitlab_rails['repository_archive_cache_worker_cron'] = "0 * * * *" # gitlab_rails['repository_archive_cache_worker_cron'] = "0 * * * *"
# gitlab_rails['pages_domain_verification_cron_worker'] = "*/15 * * * *" # gitlab_rails['pages_domain_verification_cron_worker'] = "*/15 * * * *"
# gitlab_rails['pages_domain_ssl_renewal_cron_worker'] = "*/10 * * * *" # gitlab_rails['pages_domain_ssl_renewal_cron_worker'] = "*/10 * * * *"
@ -271,6 +275,7 @@ external_url '__GENERATED_EXTERNAL_URL__'
###! Docs: https://docs.gitlab.com/ee/administration/object_storage.html ###! Docs: https://docs.gitlab.com/ee/administration/object_storage.html
gitlab_rails['object_store']['enabled'] = false gitlab_rails['object_store']['enabled'] = false
gitlab_rails['object_store']['connection'] = {} gitlab_rails['object_store']['connection'] = {}
gitlab_rails['object_store']['storage_options'] = {}
gitlab_rails['object_store']['proxy_download'] = false gitlab_rails['object_store']['proxy_download'] = false
gitlab_rails['object_store']['objects']['artifacts']['bucket'] = nil gitlab_rails['object_store']['objects']['artifacts']['bucket'] = nil
gitlab_rails['object_store']['objects']['external_diffs']['bucket'] = nil gitlab_rails['object_store']['objects']['external_diffs']['bucket'] = nil
@ -369,7 +374,7 @@ gitlab_rails['object_store']['objects']['terraform_state']['bucket'] = nil
# gitlab_rails['terraform_state_enabled'] = true # gitlab_rails['terraform_state_enabled'] = true
# gitlab_rails['terraform_state_storage_path'] = "/var/opt/gitlab/gitlab-rails/shared/terraform_state" # gitlab_rails['terraform_state_storage_path'] = "/var/opt/gitlab/gitlab-rails/shared/terraform_state"
# gitlab_rails['terraform_state_object_store_enabled'] = false # gitlab_rails['terraform_state_object_store_enabled'] = false
# gitlab_rails['terraform_state_object_store_remote_directory'] = "terraform_state" # gitlab_rails['terraform_state_object_store_remote_directory'] = "terraform"
# gitlab_rails['terraform_state_object_store_connection'] = { # gitlab_rails['terraform_state_object_store_connection'] = {
# 'provider' => 'AWS', # 'provider' => 'AWS',
# 'region' => 'eu-west-1', # 'region' => 'eu-west-1',
@ -627,7 +632,6 @@ gitlab_rails['gitlab_shell_ssh_port'] = __SSH_PORT__
# gitlab_rails['db_encoding'] = "unicode" # gitlab_rails['db_encoding'] = "unicode"
# gitlab_rails['db_collation'] = nil # gitlab_rails['db_collation'] = nil
# gitlab_rails['db_database'] = "gitlabhq_production" # gitlab_rails['db_database'] = "gitlabhq_production"
# gitlab_rails['db_pool'] = 1
# gitlab_rails['db_username'] = "gitlab" # gitlab_rails['db_username'] = "gitlab"
# gitlab_rails['db_password'] = nil # gitlab_rails['db_password'] = nil
# gitlab_rails['db_host'] = nil # gitlab_rails['db_host'] = nil
@ -747,13 +751,17 @@ gitlab_rails['gitlab_shell_ssh_port'] = __SSH_PORT__
# registry['compatibility_schema1_enabled'] = false # registry['compatibility_schema1_enabled'] = false
### Registry backend storage ### Registry backend storage
###! Docs: https://docs.gitlab.com/ee/administration/container_registry.html#container-registry-storage-driver ###! Docs: https://docs.gitlab.com/ee/administration/packages/container_registry.html#configure-storage-for-the-container-registry
# registry['storage'] = { # registry['storage'] = {
# 's3' => { # 's3' => {
# 'accesskey' => 'AKIAKIAKI', # 'accesskey' => 's3-access-key',
# 'secretkey' => 'secret123', # 'secretkey' => 's3-secret-key-for-access-key',
# 'region' => 'us-east-1', # 'bucket' => 'your-s3-bucket',
# 'bucket' => 'gitlab-registry-bucket-AKIAKIAKI' # 'region' => 'your-s3-region',
# 'regionendpoint' => 'your-s3-regionendpoint'
# },
# 'redirect' => {
# 'disable' => false
# } # }
# } # }
@ -898,7 +906,7 @@ gitlab_rails['gitlab_shell_ssh_port'] = __SSH_PORT__
##! Docs: https://docs.gitlab.com/omnibus/settings/puma.html ##! Docs: https://docs.gitlab.com/omnibus/settings/puma.html
################################################################################ ################################################################################
puma['enable'] = true # puma['enable'] = true
# puma['ha'] = false # puma['ha'] = false
# puma['worker_timeout'] = 60 # puma['worker_timeout'] = 60
puma['worker_processes'] = __PUMA_WORKER_PROCESSES__ puma['worker_processes'] = __PUMA_WORKER_PROCESSES__
@ -1513,15 +1521,23 @@ nginx['listen_https'] = false
##! GitLab API HTTP client connection timeout ##! GitLab API HTTP client connection timeout
# gitlab_pages['gitlab_client_http_timeout'] = "10s" # gitlab_pages['gitlab_client_http_timeout'] = "10s"
##! GitLab API JWT Token expiry time" ##! GitLab API JWT Token expiry time
# gitlab_pages['gitlab_client_jwt_expiry'] = "30s" # gitlab_pages['gitlab_client_jwt_expiry'] = "30s"
##! Domain configuration source, defaults to disk if set to nil
# gitlab_pages['domain_config_source'] = nil
##! Define custom gitlab-pages HTTP headers for the whole instance ##! Define custom gitlab-pages HTTP headers for the whole instance
# gitlab_pages['headers'] = [] # gitlab_pages['headers'] = []
##! Shared secret used for authentication between Pages and GitLab ##! Shared secret used for authentication between Pages and GitLab
# gitlab_pages['api_secret_key'] = nil # Will be generated if not set. Base64 encoded and exactly 32 bytes long. # gitlab_pages['api_secret_key'] = nil # Will be generated if not set. Base64 encoded and exactly 32 bytes long.
# gitlab_pages['env_directory'] = "/opt/gitlab/etc/gitlab-pages/env"
# gitlab_pages['env'] = {
# 'SSL_CERT_DIR' => "#{node['package']['install-dir']}/embedded/ssl/certs/"
# }
################################################################################ ################################################################################
## GitLab Pages NGINX ## GitLab Pages NGINX
################################################################################ ################################################################################
@ -1966,7 +1982,6 @@ nginx['listen_https'] = false
# praefect['virtual_storage_name'] = "praefect" # praefect['virtual_storage_name'] = "praefect"
# praefect['failover_enabled'] = false # praefect['failover_enabled'] = false
# praefect['failover_election_strategy'] = 'sql' # praefect['failover_election_strategy'] = 'sql'
# praefect['failover_read_only_after_failover'] = true
# praefect['auth_token'] = "" # praefect['auth_token'] = ""
# praefect['auth_transitioning'] = false # praefect['auth_transitioning'] = false
# praefect['listen_addr'] = "localhost:2305" # praefect['listen_addr'] = "localhost:2305"
@ -2229,7 +2244,6 @@ nginx['listen_https'] = false
# geo_secondary['db_encoding'] = "unicode" # geo_secondary['db_encoding'] = "unicode"
# geo_secondary['db_collation'] = nil # geo_secondary['db_collation'] = nil
# geo_secondary['db_database'] = "gitlabhq_geo_production" # geo_secondary['db_database'] = "gitlabhq_geo_production"
# geo_secondary['db_pool'] = 1
# geo_secondary['db_username'] = "gitlab_geo" # geo_secondary['db_username'] = "gitlab_geo"
# geo_secondary['db_password'] = nil # geo_secondary['db_password'] = nil
# geo_secondary['db_host'] = "/var/opt/gitlab/geo-postgresql" # geo_secondary['db_host'] = "/var/opt/gitlab/geo-postgresql"
@ -2239,7 +2253,6 @@ nginx['listen_https'] = false
# geo_secondary['db_sslcompression'] = 0 # geo_secondary['db_sslcompression'] = 0
# geo_secondary['db_sslrootcert'] = nil # geo_secondary['db_sslrootcert'] = nil
# geo_secondary['db_sslca'] = nil # geo_secondary['db_sslca'] = nil
# geo_secondary['db_fdw'] = true
################################################################################ ################################################################################
## GitLab Geo Secondary Tracking Database (EE only) ## GitLab Geo Secondary Tracking Database (EE only)

View file

@ -2,7 +2,7 @@
"name": "Gitlab", "name": "Gitlab",
"id": "gitlab", "id": "gitlab",
"packaging_format": 1, "packaging_format": 1,
"version": "13.2.3~ynh1", "version": "13.3.4~ynh1",
"description": { "description": {
"en": "Git-repository manager.", "en": "Git-repository manager.",
"fr": "Gestionnaire de dépôts Git." "fr": "Gestionnaire de dépôts Git."

View file

@ -43,7 +43,9 @@ final_path=/opt/$app
test ! -e "$final_path" || ynh_die --message="This path already contains a folder" test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
# Detect the system architecture # Detect the system architecture
if [ -n "$(uname -m | grep 64)" ]; then if [ -n "$(uname -m | grep aarch64)" ]; then
ynh_die "Gitlab is not compatible with arm64 architecture"
elif [ -n "$(uname -m | grep x86_64)" ]; then
architecture="x86-64" architecture="x86-64"
elif [ -n "$(uname -m | grep 86)" ]; then elif [ -n "$(uname -m | grep 86)" ]; then
ynh_die "Gitlab is not compatible with x86 architecture" ynh_die "Gitlab is not compatible with x86 architecture"

View file

@ -84,8 +84,9 @@ fi
# If architecture doesn't exist, create it # If architecture doesn't exist, create it
if [ -z "$architecture" ]; then if [ -z "$architecture" ]; then
# Detect the system architecture if [ -n "$(uname -m | grep aarch64)" ]; then
if [ -n "$(uname -m | grep 64)" ]; then ynh_die "Gitlab is not compatible with arm64 architecture"
elif [ -n "$(uname -m | grep x86_64)" ]; then
architecture="x86-64" architecture="x86-64"
elif [ -n "$(uname -m | grep 86)" ]; then elif [ -n "$(uname -m | grep 86)" ]; then
ynh_die "Gitlab is not compatible with x86 architecture" ynh_die "Gitlab is not compatible with x86 architecture"

View file

@ -1,18 +1,18 @@
#!/bin/bash #!/bin/bash
gitlab_version="13.2.3" gitlab_version="13.3.4"
# sha256sum found here: https://packages.gitlab.com/gitlab # sha256sum found here: https://packages.gitlab.com/gitlab
gitlab_debian_version="$(lsb_release -sc)" gitlab_debian_version="$(lsb_release -sc)"
gitlab_x86_64_buster_source_sha256="0ecce1957260de9cca3325fc0772a5976d604f3d2d5a81e10cfda7aba4dd9f7b" gitlab_x86_64_buster_source_sha256="bf0d2924f10765d08724ea78d8f5ceff4dc4d25d14a5f282aa27d62640f21d23"
gitlab_arm_buster_source_sha256="0f5e1579ced77650950a062dd89dfb0c6c9a117c94c2204c9a10d6f37f0fe4d9" gitlab_arm_buster_source_sha256="ee9b8ac7816dbedf73e319fea4c14ac1c743f06bad4a2597e5753f81789337d1"
gitlab_x86_64_stretch_source_sha256="d4437de930401e5417d5afb093a3d307e3bccb1bf71cde2fd7c79f98577604e4" gitlab_x86_64_stretch_source_sha256="bc6800fdd5f91cb18c712ea15e93887141b81658566c780231aa63051cc9fcf0"
gitlab_arm_stretch_source_sha256="5dff5d413392c2ab1fd549e938e7cc17c39b82ced92a2efcd322e5e7193ce259" gitlab_arm_stretch_source_sha256="362ab23dfc97814027c428e23900337223d3ae4c1c9220ad35b7ffd341f666cc"
architecture=$(ynh_app_setting_get --app="$app" --key=architecture) architecture=$(ynh_app_setting_get --app="$app" --key=architecture)

124
upgrade-versions.sh Executable file
View file

@ -0,0 +1,124 @@
#!/bin/bash
# /!\ This is a quick and dirty bash script, which does not respect the YNH format.
# This script will upgrade sha256sum, manifest, readme and config template
# /!\ before committing the modifications, check if nothing is broken if files
# Usage: ./upgrade-versions.sh path_to_upgrade_file version
# Example: ./upgrade-versions.sh scripts/upgrade.d/upgrade.last.sh 13.3.1
file=$(basename $1)
version=$2
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
gitlab_directory="$( cd "$( dirname "$current_dir/$1" )/../../" >/dev/null 2>&1 && pwd )"
sed -i -e "s/gitlab_version=\"[^0-9.]*[0-9.]*[0-9.]\"/gitlab_version=\"$version\"/" $gitlab_directory/scripts/upgrade.d/$file
# x86_64
for debian_version in "stretch" "buster"
do
url=https://packages.gitlab.com/gitlab/gitlab-ce/packages/debian/$debian_version/gitlab-ce_$version-ce.0_amd64.deb
new_sha256=$(curl -s $url | sed -n '/SHA256$/,/<\/tr>$/{ /SHA256$/d; /<\/tr>$/d; p; }' | cut -d$'\n' -f3 | xargs)
echo url: $url
echo sha256: $new_sha256
sed -i -e "s/gitlab_x86_64_${debian_version}_source_sha256=\".*\"/gitlab_x86_64_${debian_version}_source_sha256=\"$new_sha256\"/" $gitlab_directory/scripts/upgrade.d/$file
done
# arm
for debian_version in "stretch" "buster"
do
url=https://packages.gitlab.com/gitlab/raspberry-pi2/packages/raspbian/$debian_version/gitlab-ce_$version-ce.0_armhf.deb
new_sha256=$(curl -s $url | sed -n '/SHA256$/,/<\/tr>$/{ /SHA256$/d; /<\/tr>$/d; p; }' | cut -d$'\n' -f3 | xargs)
echo url: $url
echo sha256: $new_sha256
sed -i -e "s/gitlab_arm_${debian_version}_source_sha256=\".*\"/gitlab_arm_${debian_version}_source_sha256=\"$new_sha256\"/" $gitlab_directory/scripts/upgrade.d/$file
done
if [[ "$(basename $file)" == upgrade.last.sh ]]; then
# Update manifest
sed -i -e "s/\"version\": \"[^0-9.]*[0-9.]*[0-9.]~ynh[0-9.]\"/\"version\": \"$version~ynh1\"/" $gitlab_directory/manifest.json
# Update readme
sed -i -e "s/\*\*Shipped version:\*\* [^0-9.]*[0-9.]*[0-9.]/**Shipped version:** $version/" $gitlab_directory/README.md
sed -i -e "s/\*\*Version incluse :\*\* [^0-9.]*[0-9.]*[0-9.]/**Version incluse :** $version/" $gitlab_directory/README_fr.md
# Update gitlab.rb
conf_file=$gitlab_directory/conf/gitlab.rb
url=https://gitlab.com/gitlab-org/omnibus-gitlab/-/raw/$version+ce.0/files/gitlab-config-template/gitlab.rb.template
header="################################################################################
################################################################################
## FOR YUNOHOST USERS ##
################################################################################
################################################################################
# Please do not modify this file, it will be reset with the next update.
# You can create or modify the file:
# /etc/gitlab/gitlab-persistent.rb
# and add all the configuration you want.
# Options you add in gitlab-presistent.rb will overide these one,
# but you can use options and documentations in this file to know what
# is it possible to do.
################################################################################
################################################################################
"
footer="
from_file '/etc/gitlab/gitlab-persistent.rb'"
echo "$header" > $conf_file
curl -s "$url" >> $conf_file
echo "$footer" >> $conf_file
# Change external url
sed -i "s/external_url 'GENERATED_EXTERNAL_URL'/external_url '__GENERATED_EXTERNAL_URL__'/" $conf_file
# Activate ldap
sed -i "s/# gitlab_rails\['ldap_enabled'\] = .*/gitlab_rails['ldap_enabled'] = true/" $conf_file
ldap_conf="
gitlab_rails['ldap_servers'] = YAML.load <<-'EOS' # remember to close this block with 'EOS' below
main: # 'main' is the GitLab 'provider ID' of this LDAP server
label: 'LDAP'
host: 'localhost'
port: 389
uid: 'uid'
encryption: 'plain' # \"start_tls\" or \"simple_tls\" or \"plain\"
bind_dn: ''
password: ''
active_directory: false
allow_username_or_email_login: false
block_auto_created_users: false
base: 'ou=users,dc=yunohost,dc=org'
user_filter: ''
EOS"
# Add ldap conf
sed -i "/^# EOS/r "<(echo "$ldap_conf") $conf_file
# Change ssh port
sed -i "s/# gitlab_rails\['gitlab_shell_ssh_port'\] = 22/gitlab_rails['gitlab_shell_ssh_port'] = __SSH_PORT__/" $conf_file
# Change puma settings
sed -i "s/# puma\['worker_processes'\] = .*/puma['worker_processes'] = __PUMA_WORKER_PROCESSES__/" $conf_file
sed -i "s/# puma\['min_threads'\] = .*/puma['min_threads'] = __PUMA_MIN_THREADS__/" $conf_file
sed -i "s/# puma\['max_threads'\] = .*/puma['max_threads'] = __PUMA_MAX_THREADS__/" $conf_file
sed -i "s/# puma\['port'\] = .*/puma['port'] = __PUMA_PORT__/" $conf_file
# Change sidekiq settings
sed -i "s/# sidekiq\['listen_port'\] = .*/sidekiq['listen_port'] = __SIDEKIQ_PORT__/" $conf_file
# Change nginx settings
sed -i "s/# nginx\['client_max_body_size'\] = .*/nginx['client_max_body_size'] = '__CLIENT_MAX_BODY_SIZE__'/" $conf_file
sed -i "s/# nginx\['listen_port'\] = .*/nginx['listen_port'] = __PORT__/" $conf_file
sed -i "s/# nginx\['listen_https'\] = .*/nginx['listen_https'] = false/" $conf_file
fi