From 88087a88eafe8f23cd719c3b8a497f1660d36302 Mon Sep 17 00:00:00 2001 From: Cyrille SAVELIEF Date: Tue, 27 Jun 2023 20:44:55 +0200 Subject: [PATCH 1/3] Fixes YunoHost-Apps/jenkins_ynh#108 **Problem.** After the .deb file is installed, dpkg tries to start the service on the default port 8080. **Solution.** This fix ensure that ynh rollback won't be triggered by dpkg during installation of the .deb file. First, the `dpkg --install` error is silenced. Then `dpkg-query` is used to detect an improperly installed jenkins package. Next, after the port has been updated and the service restarted, `dpkg --configure -a` is executed to finish configuration of the partially installed jenkins package. --- scripts/install | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index cf2861e..36d336b 100644 --- a/scripts/install +++ b/scripts/install @@ -115,12 +115,17 @@ ynh_add_nginx_config ynh_script_progression --message="Installing Jenkins..." # Download jenkins deb file and install it. -dpkg --install --force-confnew ../conf/jenkins.deb +dpkg --install --force-confnew ../conf/jenkins.deb || true +dpkg_install_failed=$(dpkg-query -f '${status} ${package}\n' -W | awk '$4 ~ /^jenkins.*/ && $3 != "installed" {print $4}' | wc -l) + +if [[ $dpkg_install_failed -ge 1 ]]; then + ynh_print_warn --message="The service jenkins cannot be started for now." +fi #================================================= # SETUP APPLICATION #================================================= -ynh_script_progression --message="Setuping application..." +ynh_script_progression --message="Setuping application on port $port..." cat >> "$final_path/jenkins.install.InstallUtil.lastExecVersion" < Date: Wed, 26 Jul 2023 22:47:44 +0200 Subject: [PATCH 2/3] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 74b2ea7..1b7537b 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Extendable continuous integration server", "fr": "Serveur d'intégration continue extensible" }, - "version": "2.401.2~ynh1", + "version": "2.401.2~ynh2", "url": "https://jenkins.io/index.html", "upstream": { "license": "MIT", From 2cb52886b09623c62fc5836fe597d3191163559d Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 26 Jul 2023 20:47:50 +0000 Subject: [PATCH 3/3] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f2962ec..114d1ce 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Extendable continuous integration server -**Shipped version:** 2.401.2~ynh1 +**Shipped version:** 2.401.2~ynh2 ## Screenshots diff --git a/README_fr.md b/README_fr.md index f3e2856..94efd72 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Serveur d'intégration continue extensible -**Version incluse :** 2.401.2~ynh1 +**Version incluse :** 2.401.2~ynh2 ## Captures d’écran