mirror of
https://github.com/YunoHost-Apps/jenkins_ynh.git
synced 2024-09-03 19:26:18 +02:00
set useSecurity to false during install/upgrade
This commit is contained in:
parent
9e97a02cbe
commit
018e148506
2 changed files with 12 additions and 4 deletions
|
@ -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 -s http://${domain}:${port}${path_url}"
|
||||
ynh_replace_string --match_string="<useSecurity>true</useSecurity>" --replace_string="<useSecurity>false</useSecurity>" --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
|
||||
|
|
|
@ -160,20 +160,25 @@ ynh_systemd_action --action=restart --line_match="Jenkins is fully up and runnin
|
|||
#=================================================
|
||||
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
|
||||
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}"
|
||||
ynh_replace_string --match_string="<useSecurity>true</useSecurity>" --replace_string="<useSecurity>false</useSecurity>" --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 }' )
|
||||
|
||||
if [ -n "${UPDATE_LIST}" ]; then
|
||||
$jenkins_cli install-plugin "${UPDATE_LIST}"
|
||||
fi
|
||||
|
||||
ynh_replace_string --match_string="<useSecurity>false</useSecurity>" --replace_string="<useSecurity>true</useSecurity>" --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"
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue