1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/jenkins_ynh.git synced 2024-09-03 19:26:18 +02:00

Merge pull request #61 from YunoHost-Apps/testing

Testing
This commit is contained in:
Éric Gaspar 2021-12-13 17:52:58 +01:00 committed by GitHub
commit d96306820f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 41 additions and 84 deletions

View file

@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
Extendable continuous integration server
**Shipped version:** 2.303.2~ynh1
**Shipped version:** 2.319.1~ynh1

View file

@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
Serveur d'intégration continue extensible
**Version incluse :** 2.303.2~ynh1
**Version incluse :** 2.319.1~ynh1

View file

@ -14,26 +14,25 @@
# 2.150.2~ynh2
#upgrade=1 from_commit=29141b702f2954e0f72925121aea82a7fa3fc118
# 2.263.1~ynh1
upgrade=1 from_commit=0e1aae7be82034650e2c1f6c1ad6d68a41b80176
#upgrade=1 from_commit=0e1aae7be82034650e2c1f6c1ad6d68a41b80176
# 2.263.4~ynh1
upgrade=1 from_commit=72656bca2e144ef9a92cfec2af6cd13cb8e8aee3
#upgrade=1 from_commit=72656bca2e144ef9a92cfec2af6cd13cb8e8aee3
# 2.277.2~ynh1
upgrade=1 from_commit=e6cf48fdbcc7cac5c5147d4a7cc1ebfd9055bfef
#upgrade=1 from_commit=e6cf48fdbcc7cac5c5147d4a7cc1ebfd9055bfef
# 2.277.3~ynh1
upgrade=1 from_commit=3f0f52e24273e9da86ac2fa7000953b7734196a5
#upgrade=1 from_commit=3f0f52e24273e9da86ac2fa7000953b7734196a5
# 2.277.4~ynh1
upgrade=1 from_commit=36fdba9bbd201832f5707083b878ae967052ad6a
#upgrade=1 from_commit=36fdba9bbd201832f5707083b878ae967052ad6a
# 2.289.1~ynh1
upgrade=1 from_commit=abf516d8a4dd721af8b9a2560a2a1dbd7ea79fb8
#upgrade=1 from_commit=abf516d8a4dd721af8b9a2560a2a1dbd7ea79fb8
# 2.289.2~ynh1
upgrade=1 from_commit=c7a3a24e56e9be3b5991a175d08be116392b5a19
#upgrade=1 from_commit=c7a3a24e56e9be3b5991a175d08be116392b5a19
# 2.289.3~ynh1
upgrade=1 from_commit=f165327adcc291a479ab73050bcaa1b84784e763
#upgrade=1 from_commit=f165327adcc291a479ab73050bcaa1b84784e763
# 2.303.1~ynh1
upgrade=1 from_commit=0bb8a4ca3a90693c5594a72379704f7e08519c92
backup_restore=1
multi_instance=0
port_already_use=1 (8080)
change_url=1
;;; Options
Email=

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://pkg.jenkins.io/debian-stable/binary/jenkins_2.303.2_all.deb
SOURCE_SUM=1a39e8e856d3f9c42ba694012995be323148e2df27f7991c85aaf81f34e2aa08
SOURCE_URL=https://pkg.jenkins.io/debian-stable/binary/jenkins_2.319.1_all.deb
SOURCE_SUM=ff455afebe2f63d0c3a891071478b1f5a36ba622422a10dcd91d1b4aeba4a05e
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=deb
SOURCE_IN_SUBDIR=true

View file

@ -1,41 +0,0 @@
{
"name": "Jenkins configuration panel",
"version": "0.1",
"panel": [{
"name": "Jenkins configuration",
"id": "main",
"sections": [{
"name": "Public access",
"id": "is_public",
"options": [{
"name": "Is it a public app?",
"id": "is_public",
"type": "bool",
"default": true
}]
},
{
"name": "Overwriting config files",
"id": "overwrite_files",
"options": [{
"name": "Overwrite the NGINX config file?",
"help": "If the file is overwritten, a backup will be created.",
"id": "overwrite_nginx",
"type": "bool",
"default": true
}]
},
{
"name": "Global configuration",
"id": "global_config",
"options": [{
"name": "Send HTML email to admin?",
"help": "Allow app scripts to send HTML mails instead of plain text.",
"id": "email_type",
"type": "bool",
"default": true
}]
}]
}
]
}

24
config_panel.toml Normal file
View file

@ -0,0 +1,24 @@
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."
[main.global_config]
name = "Global configuration"
[main.global_config.email_type]
ask = "Send HTML email to admin?"
type = "boolean"
default = true
help = "Allow app scripts to send HTML mails instead of plain text."

View file

@ -6,7 +6,7 @@
"en": "Extendable continuous integration server",
"fr": "Serveur d'intégration continue extensible"
},
"version": "2.303.2~ynh1",
"version": "2.319.1~ynh1",
"url": "https://jenkins.io/index.html",
"upstream": {
"license": "MIT",
@ -23,7 +23,7 @@
"email": "maniackc_dev@crudelis.fr"
}],
"requirements": {
"yunohost": ">= 4.1.3"
"yunohost": ">= 4.3.0"
},
"multi_instance": false,
"services": [
@ -33,8 +33,7 @@
"install" : [
{
"name": "domain",
"type": "domain",
"example": "example.com"
"type": "domain"
},
{
"name": "path",

View file

@ -28,11 +28,6 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
# If the form has a value for a variable, take the value from the form,
# Otherwise, keep the value from the app config.
# is_public
old_is_public="$(ynh_app_setting_get --app=$app --key=is_public)"
old_is_public=$(bool_to_true_false $old_is_public)
is_public="${YNH_CONFIG_MAIN_IS_PUBLIC_IS_PUBLIC:-$old_is_public}"
# Overwrite nginx configuration
old_overwrite_nginx="$(ynh_app_setting_get --app=$app --key=overwrite_nginx)"
old_overwrite_nginx=$(bool_to_true_false $old_overwrite_nginx)
@ -51,8 +46,6 @@ 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_IS_PUBLIC_IS_PUBLIC=$is_public"
echo "YNH_CONFIG_MAIN_OVERWRITE_FILES_OVERWRITE_NGINX=$overwrite_nginx"
echo "YNH_CONFIG_MAIN_GLOBAL_CONFIG_EMAIL_TYPE=$admin_mail_html"
@ -64,14 +57,6 @@ show_config() {
apply_config() {
# Change public accessibility
if [ "$is_public" = "true" ]
then
yunohost app action run $app public_private --args is_public=1
else
yunohost app action run $app public_private --args is_public=0
fi
# Set overwrite_nginx
overwrite_nginx=$(bool_to_01 $overwrite_nginx)
ynh_app_setting_set --app=$app --key=overwrite_nginx --value="$overwrite_nginx"
@ -84,10 +69,4 @@ apply_config() {
#=================================================
# GENERIC FINALIZATION
#=================================================
# SELECT THE ACTION FOLLOWING THE GIVEN ARGUMENT
#=================================================
case $1 in
show) show_config;;
apply) apply_config;;
esac
ynh_app_config_run $1

View file

@ -41,10 +41,7 @@ port=$(ynh_app_setting_get --app=$app --key=port)
#=================================================
ynh_script_progression --message="Validating restoration parameters..."
ynh_webpath_available --domain=$domain --path_url=$path_url \
|| ynh_die --message="Path not available: ${domain}${path_url}"
test ! -d $final_path \
|| ynh_die --message="There is already a directory: $final_path "
test ! -d $final_path || ynh_die --message="There is already a directory: $final_path "
#=================================================
# STANDARD RESTORATION STEPS