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

Testing
This commit is contained in:
Kayou 2019-04-02 00:21:12 +02:00 committed by GitHub
commit 16699ff36e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 36 additions and 12 deletions

View file

@ -10,7 +10,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:** 11.9.1 **Shipped version:** 11.9.4
## Screenshots ## Screenshots

View file

@ -20,6 +20,7 @@ EOS
nginx['listen_port'] = __PORT__ nginx['listen_port'] = __PORT__
nginx['listen_https'] = false nginx['listen_https'] = false
nginx['listen_addresses'] = ["0.0.0.0", "[::]"] # listen on all IPv4 and IPv6 addresses nginx['listen_addresses'] = ["0.0.0.0", "[::]"] # listen on all IPv4 and IPv6 addresses
nginx['client_max_body_size'] = '__CLIENT_MAX_BODY_SIZE__'
unicorn['port'] = __PORTUNICORN__ unicorn['port'] = __PORTUNICORN__

View file

@ -1,9 +1,11 @@
location __PATH__/ { location __PATH__/ {
proxy_pass http://localhost:__PORT__; proxy_pass http://localhost:__PORT__;
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_set_header X-Forwarded-Ssl on; proxy_set_header X-Forwarded-Ssl on;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size __CLIENT_MAX_BODY_SIZE__;
include conf.d/yunohost_panel.conf.inc; include conf.d/yunohost_panel.conf.inc;
proxy_set_header Accept-Encoding ""; proxy_set_header Accept-Encoding "";
} }

View file

@ -2,7 +2,7 @@
"name": "Gitlab", "name": "Gitlab",
"id": "gitlab", "id": "gitlab",
"packaging_format": 1, "packaging_format": 1,
"version": "11.9.1~ynh1", "version": "11.9.4~ynh1",
"description": { "description": {
"en": "GitLab is a Git-repository manager.", "en": "GitLab is a Git-repository manager.",
"fr": "GitLab est un gestionnaire de dépôts Git." "fr": "GitLab est un gestionnaire de dépôts Git."

View file

@ -32,6 +32,7 @@ config_path=$(ynh_app_setting_get $app config_path)
port=$(ynh_app_setting_get "$app" web_port) port=$(ynh_app_setting_get "$app" web_port)
portUnicorn=$(ynh_app_setting_get "$app" unicorn_port) portUnicorn=$(ynh_app_setting_get "$app" unicorn_port)
unicorn_worker_processes=$(ynh_app_setting_get "$app" unicorn_worker_processes) unicorn_worker_processes=$(ynh_app_setting_get "$app" unicorn_worker_processes)
client_max_body_size=$(ynh_app_setting_get "$app" client_max_body_size)
#================================================= #=================================================
# CHECK THE SYNTAX OF THE PATHS # CHECK THE SYNTAX OF THE PATHS
@ -79,7 +80,7 @@ if [ $change_path -eq 1 ]; then
domain="$old_domain" domain="$old_domain"
path_url="$new_path" path_url="$new_path"
# Create a dedicated nginx config # Create a dedicated nginx config
ynh_add_nginx_config ynh_add_nginx_config client_max_body_size
fi fi
# Change the domain for nginx # Change the domain for nginx
@ -113,6 +114,7 @@ ynh_replace_string "__GENERATED_EXTERNAL_URL__" "https://$domain${path_url%/}" "
ynh_replace_string "__PORT__" "$port" "$config_path/gitlab.rb" ynh_replace_string "__PORT__" "$port" "$config_path/gitlab.rb"
ynh_replace_string "__PORTUNICORN__" "$portUnicorn" "$config_path/gitlab.rb" ynh_replace_string "__PORTUNICORN__" "$portUnicorn" "$config_path/gitlab.rb"
ynh_replace_string "__UNICORN_WORKER_PROCESSES__" "$unicorn_worker_processes" "$config_path/gitlab.rb" ynh_replace_string "__UNICORN_WORKER_PROCESSES__" "$unicorn_worker_processes" "$config_path/gitlab.rb"
ynh_replace_string "__CLIENT_MAX_BODY_SIZE__" "$client_max_body_size" "$config_path/gitlab.rb"
ynh_store_file_checksum "$config_path/gitlab.rb" ynh_store_file_checksum "$config_path/gitlab.rb"

View file

@ -66,6 +66,9 @@ else
unicorn_worker_processes=2 unicorn_worker_processes=2
fi fi
# Could be an option?
client_max_body_size="250m"
path_url=$(ynh_normalize_url_path $path_url) path_url=$(ynh_normalize_url_path $path_url)
# Register (book) web path # Register (book) web path
@ -84,6 +87,7 @@ ynh_app_setting_set $app final_path $final_path
ynh_app_setting_set $app config_path $config_path ynh_app_setting_set $app config_path $config_path
ynh_app_setting_set $app architecture $architecture ynh_app_setting_set $app architecture $architecture
ynh_app_setting_set $app unicorn_worker_processes $unicorn_worker_processes ynh_app_setting_set $app unicorn_worker_processes $unicorn_worker_processes
ynh_app_setting_set $app client_max_body_size $client_max_body_size
#================================================= #=================================================
# STANDARD MODIFICATIONS # STANDARD MODIFICATIONS
@ -122,6 +126,7 @@ ynh_replace_string "__GENERATED_EXTERNAL_URL__" "https://$domain${path_url%/}" "
ynh_replace_string "__PORT__" "$port" "$config_path/gitlab.rb" ynh_replace_string "__PORT__" "$port" "$config_path/gitlab.rb"
ynh_replace_string "__PORTUNICORN__" "$portUnicorn" "$config_path/gitlab.rb" ynh_replace_string "__PORTUNICORN__" "$portUnicorn" "$config_path/gitlab.rb"
ynh_replace_string "__UNICORN_WORKER_PROCESSES__" "$unicorn_worker_processes" "$config_path/gitlab.rb" ynh_replace_string "__UNICORN_WORKER_PROCESSES__" "$unicorn_worker_processes" "$config_path/gitlab.rb"
ynh_replace_string "__CLIENT_MAX_BODY_SIZE__" "$client_max_body_size" "$config_path/gitlab.rb"
#================================================= #=================================================
# STORE THE CONFIG FILE CHECKSUM # STORE THE CONFIG FILE CHECKSUM
@ -168,7 +173,7 @@ fi
ynh_print_info "Configuring nginx web server..." ynh_print_info "Configuring nginx web server..."
# Create a dedicated nginx config # Create a dedicated nginx config
ynh_add_nginx_config ynh_add_nginx_config client_max_body_size
#================================================= #=================================================
# SPECIFIC SETUP # SPECIFIC SETUP
@ -200,7 +205,7 @@ gitlab-ctl reconfigure
# ADVERTISE SERVICE IN ADMIN PANEL # ADVERTISE SERVICE IN ADMIN PANEL
#================================================= #=================================================
yunohost service add "gitlab-runsvdir" --log "/var/log/$app/gitlab-rails/application.log /var/log/$app/gitlab-rails/api_json.log /var/log/$app/gitlab-rails/production.log /var/log/$app/gitlab-rails/production_json.log /var/log/$app/gitlab-rails/sidekiq.log /var/log/$app/unicorn/unicorn_stderr.log /var/log/$app/unicorn/current /var/log/$app/alertmanager/current /var/log/$app/gitaly/current /var/log/$app/gitlab-monitor/current /var/log/$app/gitlab-shell/gitlab-shell.log /var/log/$app/gitlab-workhorse/current /var/log/$app/logrotate/current /var/log/$app/nginx/current /var/log/$app/nginx/access.log /var/log/$app/nginx/error.log /var/log/$app/nginx/gitlab_access.log /var/log/$app/nginx/gitlab_error.log /var/log/$app/node-exporter/current /var/log/$app/postgres-exporter/current /var/log/$app/postgresql/current /var/log/$app/prometheus/current /var/log/$app/redis/current /var/log/$app/redis-exporter/current" yunohost service add "gitlab-runsvdir" --log "/var/log/$app/gitlab-rails/application.log" "/var/log/$app/gitlab-rails/api_json.log" "/var/log/$app/gitlab-rails/production.log" "/var/log/$app/gitlab-rails/production_json.log" "/var/log/$app/gitlab-rails/sidekiq.log" "/var/log/$app/unicorn/unicorn_stderr.log" "/var/log/$app/unicorn/current" "/var/log/$app/alertmanager/current" "/var/log/$app/gitaly/current" "/var/log/$app/gitlab-monitor/current" "/var/log/$app/gitlab-shell/gitlab-shell.log" "/var/log/$app/gitlab-workhorse/current" "/var/log/$app/logrotate/current" "/var/log/$app/nginx/current" "/var/log/$app/nginx/access.log" "/var/log/$app/nginx/error.log" "/var/log/$app/nginx/gitlab_access.log" "/var/log/$app/nginx/gitlab_error.log" "/var/log/$app/node-exporter/current" "/var/log/$app/postgres-exporter/current" "/var/log/$app/postgresql/current" "/var/log/$app/prometheus/current" "/var/log/$app/redis/current" "/var/log/$app/redis-exporter/current"
#================================================= #=================================================
# SETUP SSOWAT # SETUP SSOWAT

View file

@ -128,7 +128,7 @@ gitlab-rake gitlab:check SANITIZE=true
# ADVERTISE SERVICE IN ADMIN PANEL # ADVERTISE SERVICE IN ADMIN PANEL
#================================================= #=================================================
yunohost service add "gitlab-runsvdir" --log "/var/log/$app/gitlab-rails/application.log /var/log/$app/gitlab-rails/api_json.log /var/log/$app/gitlab-rails/production.log /var/log/$app/gitlab-rails/production_json.log /var/log/$app/gitlab-rails/sidekiq.log /var/log/$app/unicorn/unicorn_stderr.log /var/log/$app/unicorn/current /var/log/$app/alertmanager/current /var/log/$app/gitaly/current /var/log/$app/gitlab-monitor/current /var/log/$app/gitlab-shell/gitlab-shell.log /var/log/$app/gitlab-workhorse/current /var/log/$app/logrotate/current /var/log/$app/nginx/current /var/log/$app/nginx/access.log /var/log/$app/nginx/error.log /var/log/$app/nginx/gitlab_access.log /var/log/$app/nginx/gitlab_error.log /var/log/$app/node-exporter/current /var/log/$app/postgres-exporter/current /var/log/$app/postgresql/current /var/log/$app/prometheus/current /var/log/$app/redis/current /var/log/$app/redis-exporter/current" yunohost service add "gitlab-runsvdir" --log "/var/log/$app/gitlab-rails/application.log" "/var/log/$app/gitlab-rails/api_json.log" "/var/log/$app/gitlab-rails/production.log" "/var/log/$app/gitlab-rails/production_json.log" "/var/log/$app/gitlab-rails/sidekiq.log" "/var/log/$app/unicorn/unicorn_stderr.log" "/var/log/$app/unicorn/current" "/var/log/$app/alertmanager/current" "/var/log/$app/gitaly/current" "/var/log/$app/gitlab-monitor/current" "/var/log/$app/gitlab-shell/gitlab-shell.log" "/var/log/$app/gitlab-workhorse/current" "/var/log/$app/logrotate/current" "/var/log/$app/nginx/current" "/var/log/$app/nginx/access.log" "/var/log/$app/nginx/error.log" "/var/log/$app/nginx/gitlab_access.log" "/var/log/$app/nginx/gitlab_error.log" "/var/log/$app/node-exporter/current" "/var/log/$app/postgres-exporter/current" "/var/log/$app/postgresql/current" "/var/log/$app/prometheus/current" "/var/log/$app/redis/current" "/var/log/$app/redis-exporter/current"
#================================================= #=================================================
# WAITING GITLAB # WAITING GITLAB

View file

@ -29,6 +29,7 @@ port=$(ynh_app_setting_get "$app" web_port)
portUnicorn=$(ynh_app_setting_get "$app" unicorn_port) portUnicorn=$(ynh_app_setting_get "$app" unicorn_port)
architecture=$(ynh_app_setting_get "$app" architecture) architecture=$(ynh_app_setting_get "$app" architecture)
unicorn_worker_processes=$(ynh_app_setting_get "$app" unicorn_worker_processes) unicorn_worker_processes=$(ynh_app_setting_get "$app" unicorn_worker_processes)
client_max_body_size=$(ynh_app_setting_get "$app" client_max_body_size)
#================================================= #=================================================
# ENSURE DOWNWARD COMPATIBILITY # ENSURE DOWNWARD COMPATIBILITY
@ -86,6 +87,11 @@ if [ -z "$architecture" ]; then
ynh_app_setting_set $app architecture $architecture ynh_app_setting_set $app architecture $architecture
fi fi
# If client_max_body_size doesn't exist, create it
if [ -z "$client_max_body_size" ]; then
client_max_body_size="250m"
fi
# If domain doesn't exist, retrieve it # If domain doesn't exist, retrieve it
if [ -z "$domain" ]; then if [ -z "$domain" ]; then
domain=$(grep "external_url" "/etc/gitlab/gitlab.rb" | cut -d'/' -f3) # retrieve $domain from conf file domain=$(grep "external_url" "/etc/gitlab/gitlab.rb" | cut -d'/' -f3) # retrieve $domain from conf file
@ -168,6 +174,7 @@ ynh_replace_string "__GENERATED_EXTERNAL_URL__" "https://$domain${path_url%/}" "
ynh_replace_string "__PORT__" "$port" "$config_path/gitlab.rb" ynh_replace_string "__PORT__" "$port" "$config_path/gitlab.rb"
ynh_replace_string "__PORTUNICORN__" "$portUnicorn" "$config_path/gitlab.rb" ynh_replace_string "__PORTUNICORN__" "$portUnicorn" "$config_path/gitlab.rb"
ynh_replace_string "__UNICORN_WORKER_PROCESSES__" "$unicorn_worker_processes" "$config_path/gitlab.rb" ynh_replace_string "__UNICORN_WORKER_PROCESSES__" "$unicorn_worker_processes" "$config_path/gitlab.rb"
ynh_replace_string "__CLIENT_MAX_BODY_SIZE__" "$client_max_body_size" "$config_path/gitlab.rb"
ynh_store_file_checksum "$config_path/gitlab.rb" ynh_store_file_checksum "$config_path/gitlab.rb"
@ -210,7 +217,7 @@ fi
ynh_print_info "Configuring nginx web server..." ynh_print_info "Configuring nginx web server..."
# Create a dedicated nginx config # Create a dedicated nginx config
ynh_add_nginx_config ynh_add_nginx_config client_max_body_size
#================================================= #=================================================
# GENERIC FINALIZATION # GENERIC FINALIZATION
@ -218,7 +225,7 @@ ynh_add_nginx_config
# ADVERTISE SERVICE IN ADMIN PANEL # ADVERTISE SERVICE IN ADMIN PANEL
#================================================= #=================================================
yunohost service add "gitlab-runsvdir" --log "/var/log/$app/gitlab-rails/application.log /var/log/$app/gitlab-rails/api_json.log /var/log/$app/gitlab-rails/production.log /var/log/$app/gitlab-rails/production_json.log /var/log/$app/gitlab-rails/sidekiq.log /var/log/$app/unicorn/unicorn_stderr.log /var/log/$app/unicorn/current /var/log/$app/alertmanager/current /var/log/$app/gitaly/current /var/log/$app/gitlab-monitor/current /var/log/$app/gitlab-shell/gitlab-shell.log /var/log/$app/gitlab-workhorse/current /var/log/$app/logrotate/current /var/log/$app/nginx/current /var/log/$app/nginx/access.log /var/log/$app/nginx/error.log /var/log/$app/nginx/gitlab_access.log /var/log/$app/nginx/gitlab_error.log /var/log/$app/node-exporter/current /var/log/$app/postgres-exporter/current /var/log/$app/postgresql/current /var/log/$app/prometheus/current /var/log/$app/redis/current /var/log/$app/redis-exporter/current" yunohost service add "gitlab-runsvdir" --log "/var/log/$app/gitlab-rails/application.log" "/var/log/$app/gitlab-rails/api_json.log" "/var/log/$app/gitlab-rails/production.log" "/var/log/$app/gitlab-rails/production_json.log" "/var/log/$app/gitlab-rails/sidekiq.log" "/var/log/$app/unicorn/unicorn_stderr.log" "/var/log/$app/unicorn/current" "/var/log/$app/alertmanager/current" "/var/log/$app/gitaly/current" "/var/log/$app/gitlab-monitor/current" "/var/log/$app/gitlab-shell/gitlab-shell.log" "/var/log/$app/gitlab-workhorse/current" "/var/log/$app/logrotate/current" "/var/log/$app/nginx/current" "/var/log/$app/nginx/access.log" "/var/log/$app/nginx/error.log" "/var/log/$app/nginx/gitlab_access.log" "/var/log/$app/nginx/gitlab_error.log" "/var/log/$app/node-exporter/current" "/var/log/$app/postgres-exporter/current" "/var/log/$app/postgresql/current" "/var/log/$app/prometheus/current" "/var/log/$app/redis/current" "/var/log/$app/redis-exporter/current"
#================================================= #=================================================
# SETUP SSOWAT # SETUP SSOWAT

View file

@ -0,0 +1,7 @@
gitlab_version="11.9.1"
gitlab_x86_64_source_sha256="9668345176be07f1f8637b3c72ffea6f8fe2e76a8c5b10b74a340b9b6b97788c"
gitlab_arm_source_sha256="df1fb5be8ec089a77cfe8276cbaabe0e40b0f3368cafc07de984d7795252ee21"
gitlab_filename="gitlab-ce-${gitlab_version}.deb"

View file

@ -1,7 +1,7 @@
gitlab_version="11.9.1" gitlab_version="11.9.4"
gitlab_x86_64_source_sha256="9668345176be07f1f8637b3c72ffea6f8fe2e76a8c5b10b74a340b9b6b97788c" gitlab_x86_64_source_sha256="20963cd803b116d041795f50c607ddf837e7226bc46025997348fe1c2e5e35ca"
gitlab_arm_source_sha256="df1fb5be8ec089a77cfe8276cbaabe0e40b0f3368cafc07de984d7795252ee21" gitlab_arm_source_sha256="dba6f34b23ba74765b03ce9521b16a5e951e6bd6d1f2fdcce692a58f43a4c48b"
gitlab_filename="gitlab-ce-${gitlab_version}.deb" gitlab_filename="gitlab-ce-${gitlab_version}.deb"