diff --git a/README.md b/README.md index 8379ba3..1fc161c 100644 --- a/README.md +++ b/README.md @@ -5,15 +5,13 @@ *[Lire ce readme en français.](./README_fr.md)* -> **This package doesn't work anymore on debian Jessie, because the last jenkins version which works on Jessie was 2.46.3, but the plugins aren't available anymore for this version.** - > *This package allow you to install jenkins quickly and simply on a YunoHost server. If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.* ## Overview The leading open source automation server, Jenkins provides hundreds of plugins to support building, deploying and automating any project. -**Shipped version:** 2.164.2 +**Shipped version:** 2.235.2 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 5c0807e..9c58c84 100644 --- a/README_fr.md +++ b/README_fr.md @@ -5,15 +5,13 @@ *[Read this readme in english.](./README.md)* -> **Ce package ne fonctionne plus sur debian Jessie, parce que la dernière version de jenkins qui fonctionne sur Jessie était la 2.46.3, mais les plugins ne sont plus disponibles pour cette version.** - > *Ce package vous permet d'installer jenkins rapidement et simplement sur un serveur YunoHost. Si vous n'avez pas YunoHost, merci de regarder [ici](https://yunohost.org/#/install_fr) pour savoir comment l'installer et en profiter.* ## Résumé Premier serveur d'automatisation open source, Jenkins fournit des centaines de plugins pour supporter la construction, le déploiement et l'automatisation de n'importe quel projet. -**Version embarquée:** 2.164.2 +**Version embarquée:** 2.235.2 ## Captures d'écran diff --git a/conf/app.src b/conf/app.src index b51cf02..4b35df4 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://pkg.jenkins.io/debian-stable/binary/jenkins_2.164.3_all.deb -SOURCE_SUM=183b98b12a23374273150741c9fea269 +SOURCE_URL=https://pkg.jenkins.io/debian-stable/binary/jenkins_2.235.2_all.deb +SOURCE_SUM=536f5486831243337312e7995a10b993 SOURCE_SUM_PRG=md5sum SOURCE_FORMAT=deb SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 6c62951..aba0f02 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.164.2~ynh1", + "version": "2.235.2~ynh1", "url": "https://jenkins.io/index.html", "license": "MIT", "maintainer": { diff --git a/scripts/install b/scripts/install index 681b9f7..1b5ea60 100644 --- a/scripts/install +++ b/scripts/install @@ -175,7 +175,7 @@ ynh_systemd_action --action=restart --line_match="Jenkins is fully up and runnin ynh_script_progression --message="Installing plugins..." --weight=60 # If the log says that jenkins has started, install the plugins -wget -nv --no-check-certificate https://$domain$path_url/jnlpJars/jenkins-cli.jar -O /var/lib/jenkins/jenkins-cli.jar +wget -nv --no-check-certificate https://$domain${path_url%/}/jnlpJars/jenkins-cli.jar -O /var/lib/jenkins/jenkins-cli.jar for i in `seq 1 $timeout` do # Wait for an update of plugin repositories @@ -187,7 +187,10 @@ do fi done -jenkins_cli="ynh_exec_warn_less java -jar /var/lib/jenkins/jenkins-cli.jar -remoting -s http://$domain$path_url" +ynh_replace_string --match_string="true" --replace_string="false" --target_file=/var/lib/jenkins/config.xml +ynh_systemd_action --action=restart --line_match="Jenkins is fully up and running" --log_path="/var/log/$app/$app.log" --timeout="$timeout" + +jenkins_cli="ynh_exec_warn_less java -jar /var/lib/jenkins/jenkins-cli.jar -s http://${domain}:${port}${path_url%/}" # Install plugins for http authentication and ldap. $jenkins_cli install-plugin reverse-proxy-auth-plugin diff --git a/scripts/upgrade b/scripts/upgrade index 78799f1..67cc22e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -155,13 +155,6 @@ ynh_script_progression --message="Restarting Jenkins..." --weight=25 # Wait for Jenkins to be fully started ynh_systemd_action --action=restart --line_match="Jenkins is fully up and running" --log_path="/var/log/$app/$app.log" --timeout="3600" -#================================================= -# UPGRADE JENKINS-CLI.PHAR -#================================================= -ynh_script_progression --message="Upgrading jenkins-cli.phar..." - -wget -nv --no-check-certificate https://$domain$path_url/jnlpJars/jenkins-cli.jar -O /var/lib/jenkins/jenkins-cli.jar - #================================================= # DEACTIVE MAINTENANCE MODE #================================================= @@ -169,6 +162,34 @@ ynh_script_progression --message="Disabling maintenance mode..." --weight=6 ynh_maintenance_mode_OFF +#================================================= +# UPGRADE JENKINS-CLI.PHAR +#================================================= +ynh_script_progression --message="Upgrading jenkins-cli.phar..." + +wget -nv --no-check-certificate https://$domain${path_url%/}/jnlpJars/jenkins-cli.jar -O /var/lib/jenkins/jenkins-cli.jar + +#================================================= +# UPGRADE PLUGINS +#================================================= +ynh_script_progression --message="Upgrading plugins..." --weight=40 + +cp /var/lib/jenkins/config.xml /var/lib/jenkins/config.xml.bak + +ynh_replace_string --match_string="true" --replace_string="false" --target_file=/var/lib/jenkins/config.xml +ynh_systemd_action --action=restart --line_match="Jenkins is fully up and running" --log_path="/var/log/$app/$app.log" --timeout="3600" + +jenkins_cli="ynh_exec_warn_less java -jar /var/lib/jenkins/jenkins-cli.jar -s http://${domain}:${port}${path_url%/}" +UPDATE_LIST=$($jenkins_cli list-plugins | grep -e ')$' | awk '{ print $1 }' ) + +for plugin in ${UPDATE_LIST} +do + $jenkins_cli install-plugin "$plugin" || true +done + +mv /var/lib/jenkins/config.xml.bak /var/lib/jenkins/config.xml +ynh_systemd_action --action=restart --line_match="Jenkins is fully up and running" --log_path="/var/log/$app/$app.log" --timeout="3600" + #================================================= # SEND A README FOR THE ADMIN #=================================================