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

upgrade plugins

This commit is contained in:
Kay0u 2020-07-15 17:04:36 +02:00
parent 3a8557b173
commit 9e97a02cbe
No known key found for this signature in database
GPG key ID: AAFEEB16CFA2AE2D

View file

@ -162,6 +162,20 @@ 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
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 }' )
if [ -n "${UPDATE_LIST}" ]; then
$jenkins_cli install-plugin "${UPDATE_LIST}"
fi
ynh_systemd_action --action=restart --line_match="Jenkins is fully up and running" --log_path="/var/log/$app/$app.log" --timeout="3600"
#=================================================
# DEACTIVE MAINTENANCE MODE
#=================================================