mirror of
https://github.com/YunoHost-Apps/jenkins_ynh.git
synced 2024-09-03 19:26:18 +02:00
commit
b32733f711
6 changed files with 38 additions and 18 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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": {
|
||||
|
|
|
@ -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="<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
|
||||
|
|
|
@ -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="<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 }' )
|
||||
|
||||
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
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue