diff --git a/conf/php-fpm.conf b/conf/php-fpm.conf index 89a1ab7..3f4bc72 100644 --- a/conf/php-fpm.conf +++ b/conf/php-fpm.conf @@ -389,4 +389,15 @@ catch_workers_output = yes ;php_flag[display_errors] = off ;php_admin_value[error_log] = /var/log/fpm-php.www.log ;php_admin_flag[log_errors] = on -;php_admin_value[memory_limit] = 32M \ No newline at end of file +;php_admin_value[memory_limit] = 32M + +; Common values to change to increase file upload limit +; php_value[upload_max_filesize] = 50M +; php_value[post_max_size] = 50M +; php_valuemail.add_x_header = Off + +; Other common parameters +; php_value[max_execution_time] = 600 +; php_value[max_input_time] = 300 +; php_value[memory_limit] = 256M +; php_value[short_open_tag] = On \ No newline at end of file diff --git a/conf/php-fpm.ini b/conf/php-fpm.ini deleted file mode 100644 index 0dab855..0000000 --- a/conf/php-fpm.ini +++ /dev/null @@ -1,10 +0,0 @@ -; Common values to change to increase file upload limit -; upload_max_filesize = 50M -; post_max_size = 50M -; mail.add_x_header = Off - -; Other common parameters -; max_execution_time = 600 -; max_input_time = 300 -; memory_limit = 256M -; short_open_tag = On \ No newline at end of file diff --git a/manifest.json b/manifest.json index c4b3781..7b24aaa 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,7 @@ "id": "garradin", "packaging_format": 1, "requirements": { - "yunohost": ">= 2.7.2" + "yunohost": "3.5.0" }, "description": { "en": "Software to manage association", diff --git a/script_jenkins.sh b/script_jenkins.sh new file mode 100644 index 0000000..ad2bcd3 --- /dev/null +++ b/script_jenkins.sh @@ -0,0 +1,61 @@ +#!/bin/bash + +# Usage: +# send_to_dev_ci.sh +# Use without arguments, the script will use the static list at the end of script +# +# send_to_dev_ci.sh my_app my_other_app "the directory/which/contains/my_third_app" +# Use with arguments, each argument will be considered as an app to send to the CI. + +# Get the path of this script +script_dir="$(dirname "$(realpath "$0")")" + +# Get potential arguments and store them into an array +if [ $# -ge 1 ] +then + folders_to_send=("$@") +fi + +ssh_user=rodinux +ssh_host=ci-apps-dev.yunohost.org +ssh_port=22 +ssh_key=~/.ssh/id_rsa +distant_dir=/data +SSHSOCKET=~/.ssh/ssh-socket-%r-%h-%p + +SEND_TO_CI () { + echo "============================" + echo ">>> Sending $1" + rsync -avzhuE -c --progress --delete --exclude=".git" "${1%/}" -e "ssh -i $ssh_key -p $ssh_port -o ControlPath=$SSHSOCKET" $ssh_user@$ssh_host:"$distant_dir/" + echo "=============" + echo "Build should show up here once it starts:" + echo "https://$ssh_host/jenkins/view/$ssh_user/job/$(basename "${1%/}")%20($ssh_user)/lastBuild/console" +} + +echo "Opening connection" +ssh $ssh_user@$ssh_host -p $ssh_port -i $ssh_key -f -M -N -o ControlPath=$SSHSOCKET +if [ "$?" -ne 0 ] +then + # If the user wait too long, the connection will fail. + # Same player try again + ssh $ssh_user@$ssh_host -p $ssh_port -i $ssh_key -f -M -N -o ControlPath=$SSHSOCKET +fi + +# If the script has arguments, use them +if [ -n "$folders_to_send" ] +then + # Read each arguments separately + for folder in "${folders_to_send[@]}" + do + SEND_TO_CI "$folder" + done + +# Otherwise, without arguments, use the static list +else + SEND_TO_CI "$script_dir/garradin_ynh" + SEND_TO_CI "$script_dir/APP2" + SEND_TO_CI "$script_dir/APP3" +fi + +echo "Closing connection" +ssh $ssh_user@$ssh_host -p $ssh_port -i $ssh_key -S $SSHSOCKET -O exit