mirror of
https://github.com/YunoHost-Apps/jenkins_ynh.git
synced 2024-09-03 19:26:18 +02:00
Merge pull request #139 from YunoHost-Apps/testing
Update manifest.toml: zzzz
This commit is contained in:
commit
564fd0bbfc
11 changed files with 10 additions and 81 deletions
|
@ -5,7 +5,7 @@ It shall NOT be edited by hand.
|
|||
|
||||
# Jenkins for YunoHost
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/jenkins)  
|
||||
[](https://ci-apps.yunohost.org/ci/apps/jenkins/)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=jenkins)
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ No se debe editar a mano.
|
|||
|
||||
# Jenkins para Yunohost
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/jenkins)  
|
||||
[](https://ci-apps.yunohost.org/ci/apps/jenkins/)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=jenkins)
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ EZ editatu eskuz.
|
|||
|
||||
# Jenkins YunoHost-erako
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/jenkins)  
|
||||
[](https://ci-apps.yunohost.org/ci/apps/jenkins/)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=jenkins)
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ Il NE doit PAS être modifié à la main.
|
|||
|
||||
# Jenkins pour YunoHost
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/jenkins)  
|
||||
[](https://ci-apps.yunohost.org/ci/apps/jenkins/)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=jenkins)
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ NON debe editarse manualmente.
|
|||
|
||||
# Jenkins para YunoHost
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/jenkins)  
|
||||
[](https://ci-apps.yunohost.org/ci/apps/jenkins/)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=jenkins)
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
# YunoHost 上的 Jenkins
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/jenkins)  
|
||||
[](https://ci-apps.yunohost.org/ci/apps/jenkins/)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=jenkins)
|
||||
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
version = "1.0"
|
||||
|
||||
[main]
|
||||
name = "Jenkins configuration"
|
||||
|
||||
[main.overwrite_files]
|
||||
name = "Overwriting config files"
|
||||
|
||||
[main.overwrite_files.overwrite_nginx]
|
||||
ask = "Overwrite the NGINX config file?"
|
||||
type = "boolean"
|
||||
default = true
|
||||
help = "If the file is overwritten, a backup will be created."
|
|
@ -25,9 +25,9 @@ architectures = "all"
|
|||
multi_instance = false
|
||||
ldap = true
|
||||
sso = false
|
||||
disk = "50M" # FIXME: replace with an **estimate** minimum disk requirement. e.g. 20M, 400M, 1G, ...
|
||||
ram.build = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ...
|
||||
ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ...
|
||||
disk = "50M"
|
||||
ram.build = "50M"
|
||||
ram.runtime = "50M"
|
||||
|
||||
[install]
|
||||
[install.domain]
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
#=================================================
|
||||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
||||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# LOAD VALUES
|
||||
#=================================================
|
||||
|
||||
# Load the real value from the app config or elsewhere.
|
||||
# Then get the value from the form.
|
||||
# If the form has a value for a variable, take the value from the form,
|
||||
# Otherwise, keep the value from the app config.
|
||||
|
||||
# Overwrite nginx configuration
|
||||
old_overwrite_nginx="$(ynh_app_setting_get --app="$app" --key="overwrite_nginx")"
|
||||
old_overwrite_nginx=$(b01_to_bool "$old_overwrite_nginx")
|
||||
overwrite_nginx="${YNH_CONFIG_MAIN_OVERWRITE_FILES_OVERWRITE_NGINX:-$old_overwrite_nginx}"
|
||||
|
||||
#=================================================
|
||||
# SHOW_CONFIG FUNCTION FOR 'SHOW' COMMAND
|
||||
#=================================================
|
||||
|
||||
show_config() {
|
||||
# here you are supposed to read some config file/database/other then print the values
|
||||
# echo "YNH_CONFIG_${PANEL_ID}_${SECTION_ID}_${OPTION_ID}=value"
|
||||
|
||||
echo "YNH_CONFIG_MAIN_OVERWRITE_FILES_OVERWRITE_NGINX=$overwrite_nginx"
|
||||
}
|
||||
|
||||
#=================================================
|
||||
# MODIFY THE CONFIGURATION
|
||||
#=================================================
|
||||
|
||||
apply_config() {
|
||||
# Set overwrite_nginx
|
||||
overwrite_nginx=$(bool_to_01 "$overwrite_nginx")
|
||||
ynh_app_setting_set --app="$app" --key=overwrite_nginx --value="$overwrite_nginx"
|
||||
}
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
ynh_app_config_run "$1"
|
|
@ -12,7 +12,6 @@ source /usr/share/yunohost/helpers
|
|||
#=================================================
|
||||
|
||||
jenkins_version=$(ynh_app_upstream_version)
|
||||
ynh_app_setting_set --app="$app" --key="overwrite_nginx" --value="1"
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
|
|
|
@ -19,12 +19,6 @@ ynh_systemd_action --service_name="$app" --action="stop" --log_path="systemd"
|
|||
#=================================================
|
||||
ynh_script_progression --message="Ensuring downward compatibility..."
|
||||
|
||||
# If overwrite_nginx doesn't exist, create it
|
||||
if [ -z "${overwrite_nginx:-}" ]; then
|
||||
overwrite_nginx=1
|
||||
ynh_app_setting_set --app="$app" --key="overwrite_nginx" --value="$overwrite_nginx"
|
||||
fi
|
||||
|
||||
# Remove the apt list entry for jenkins
|
||||
if [ -e "/etc/apt/sources.list.d/jenkins.list" ]; then
|
||||
ynh_secure_remove --file=/etc/apt/sources.list.d/jenkins.list
|
||||
|
@ -84,10 +78,7 @@ done
|
|||
#=================================================
|
||||
ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1
|
||||
|
||||
# Overwrite the nginx configuration only if it's allowed
|
||||
if [ "$overwrite_nginx" -eq 1 ]; then
|
||||
ynh_add_nginx_config
|
||||
fi
|
||||
ynh_add_nginx_config
|
||||
|
||||
yunohost service add "$app" --description="Jenkins Continuous Integration Server"
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue