diff --git a/check_process b/check_process index f3badc1..1d562c3 100644 --- a/check_process +++ b/check_process @@ -1,8 +1,8 @@ ;; Test complet ; Manifest - domain="domain.tld" (DOMAIN) - path="/path" (PATH) - is_public=1 (PUBLIC|public=1|private=0) + domain="domain.tld" + path="/path" + is_public=1 ; Checks pkg_linter=1 setup_sub_dir=1 diff --git a/doc/.gitkeep b/doc/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md new file mode 100644 index 0000000..b639e06 --- /dev/null +++ b/doc/DISCLAIMER.md @@ -0,0 +1,3 @@ +* Other infos that people should be aware of, such as: + * Use the admin panel of your Jenkins to configure this app. + \ No newline at end of file diff --git a/doc/screenshots/.gitkeep b/doc/screenshots/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/doc/screenshots/screenshot1.png b/doc/screenshots/screenshot1.png new file mode 100644 index 0000000..0d0d50b Binary files /dev/null and b/doc/screenshots/screenshot1.png differ diff --git a/manifest.json b/manifest.json index d6bfd55..bed03e8 100644 --- a/manifest.json +++ b/manifest.json @@ -8,6 +8,12 @@ }, "version": "2.289.1~ynh1", "url": "https://jenkins.io/index.html", + "upstream": { + "license": "MIT", + "website": "https://jenkins.io", + "userdoc": "https://www.jenkins.io/doc/book/", + "code": "https://github.com/jenkinsci/jenkins" + }, "license": "MIT", "maintainer": { "name": "", diff --git a/scripts/install b/scripts/install index 46cdb9b..10244da 100644 --- a/scripts/install +++ b/scripts/install @@ -84,6 +84,10 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="../conf" +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:$app "$final_path" + #================================================= # NGINX CONFIGURATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 90405df..bf99408 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -30,6 +30,33 @@ ynh_script_progression --message="Checking version..." upgrade_type=$(ynh_check_app_version_changed) +#================================================= +# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP +#================================================= +ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." + +# Backup the current version of the app +ynh_backup_before_upgrade +ynh_clean_setup () { + ynh_clean_check_starting + # Restore it if the upgrade fails + ynh_restore_upgradebackup +} +# Exit if an error occurs during the execution of the script +ynh_abort_if_errors + +ynh_backup_if_checksum_is_different --file="/etc/default/jenkins" +ynh_backup_if_checksum_is_different --file="$final_path/config.xml" + +#================================================= +# STANDARD UPGRADE STEPS +#================================================= +# STOP SYSTEMD SERVICE +#================================================= +ynh_script_progression --message="Stopping a systemd service..." + +ynh_systemd_action --service_name=$app --action="stop" --line_match="Stopped LSB" --log_path="systemd" + #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= @@ -64,33 +91,6 @@ if ! ynh_permission_exists --permission="github-webhook"; then ynh_permission_create --permission="github-webhook" --url "/github-webhook" --allowed="visitors" --show_tile="false" --protected="true" fi -#================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP -#================================================= -ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." - -# Backup the current version of the app -ynh_backup_before_upgrade -ynh_clean_setup () { - ynh_clean_check_starting - # Restore it if the upgrade fails - ynh_restore_upgradebackup -} -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - -ynh_backup_if_checksum_is_different --file="/etc/default/jenkins" -ynh_backup_if_checksum_is_different --file="$final_path/config.xml" - -#================================================= -# STANDARD UPGRADE STEPS -#================================================= -# STOP SYSTEMD SERVICE -#================================================= -ynh_script_progression --message="Stopping a systemd service..." - -ynh_systemd_action --service_name=$app --action="stop" --line_match="Stopped LSB" --log_path="systemd" - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #=================================================