diff --git a/check_process b/check_process index 03d9e18..8c37801 100644 --- a/check_process +++ b/check_process @@ -2,8 +2,8 @@ ; pre-install sudo git clone https://github.com/YunoHost/CI_package_check /home/CI_package_check ; Manifest - domain="domain.tld" (DOMAIN) - path="/path" (PATH) + domain="domain.tld" + path="/path" ; Checks pkg_linter=1 setup_sub_dir=1 diff --git a/conf/nginx.conf b/conf/nginx.conf index 043af6c..c9a0b99 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,27 +1,29 @@ #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; location __PATH__/ { - alias __FINALPATH__/; - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } + # Path to source + alias __FINALPATH__/ ; - proxy_pass http://127.0.0.1:__PORT__/; + if ($scheme = http) { + rewrite ^ https://$server_name$request_uri? permanent; + } - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "Upgrade"; + proxy_pass http://127.0.0.1:__PORT__/; - # Include SSOWAT user panel. - include conf.d/yunohost_panel.conf.inc; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; - location __PATH__/logs { - alias /home/CI_package_check/logs/; - autoindex on; - } - - location __PATH__/badges/ { - alias /home/CI_package_check/badges/; - autoindex on; - } + # Include SSOWAT user panel. + include conf.d/yunohost_panel.conf.inc; + + location __PATH__/logs { + alias /home/CI_package_check/logs/; + autoindex on; + } + + location __PATH__/badges/ { + alias /home/CI_package_check/badges/; + autoindex on; + } } diff --git a/conf/systemd.service b/conf/systemd.service index d7c7185..0921e3d 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -7,7 +7,7 @@ Type=simple Restart=always User=__APP__ Group=__APP__ -WorkingDirectory=__FINALPATH__ +WorkingDirectory=__FINALPATH__/ ExecStart=__FINALPATH__/venv/bin/python ./run.py [Install] diff --git a/doc/.gitkeep b/doc/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md new file mode 100644 index 0000000..1411346 --- /dev/null +++ b/doc/DISCLAIMER.md @@ -0,0 +1,3 @@ +* Any known limitations, constrains or stuff not working, such as (but not limited to): + * You need to install [CI_package_check](https://github.com/YunoHost/CI_package_check) using the build_CI.sh script before installing YunoRunner + * When YunoRunner is installed, modify the systemd script to add the path of the script analyseCI.sh. The default systemd is configured to `/home/CI_package_check/analyseCI.sh` diff --git a/doc/screenshots/.gitkeep b/doc/screenshots/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/doc/screenshots/screenshot1.png b/doc/screenshots/screenshot1.png new file mode 100644 index 0000000..099048d Binary files /dev/null and b/doc/screenshots/screenshot1.png differ diff --git a/manifest.json b/manifest.json index 11d96a2..b8244cf 100644 --- a/manifest.json +++ b/manifest.json @@ -8,6 +8,10 @@ }, "version": "2021-06-30~ynh1", "url": "https://github.com/YunoHost/yunorunner", + "upstream": { + "license": "GPL-3.0-or-later", + "code": "https://github.com/YunoHost/yunorunner" + }, "license": "GPL-3.0-or-later", "maintainer": { "name": "" diff --git a/scripts/_common.sh b/scripts/_common.sh index 732d36c..ee77031 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -9,7 +9,7 @@ pkg_dependencies="python3-venv python3-dev python3-pip sqlite3" yunorunner_repository="https://github.com/YunoHost/yunorunner" -yunorunner_release="eda079abcfdddbcefa1ceb863f9224b1cc077eb2" +yunorunner_release="9cde6e979a59424396659fa934323a677ba8c960" #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index 4cb2ff6..202e137 100644 --- a/scripts/install +++ b/scripts/install @@ -71,7 +71,7 @@ ynh_install_app_dependencies $pkg_dependencies ynh_script_progression --message="Configuring system user..." # Create a system user -ynh_system_user_create --username=$app --home_dir="$final_path" +ynh_system_user_create --username=$app --home_dir=$final_path #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -110,9 +110,6 @@ pushd $final_path python3 -m venv venv venv/bin/pip install --upgrade pip venv/bin/pip install -r requirements-frozen.txt - #Fix current websocket version error (2019-02-14) - venv/bin/pip uninstall -y websockets - venv/bin/pip install 'websockets>=6.0,<7.0' popd #================================================= diff --git a/scripts/remove b/scripts/remove index c561c2c..524c878 100644 --- a/scripts/remove +++ b/scripts/remove @@ -26,6 +26,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) # REMOVE SERVICE INTEGRATION IN YUNOHOST #================================================= +# Remove the service from the list of services known by YunoHost (added from `yunohost service add`) if ynh_exec_warn_less yunohost service status $app >/dev/null then ynh_script_progression --message="Removing $app service integration..." diff --git a/scripts/restore b/scripts/restore index dc2d712..ff8d889 100644 --- a/scripts/restore +++ b/scripts/restore @@ -94,9 +94,6 @@ pushd $final_path python3 -m venv venv venv/bin/pip install --upgrade pip venv/bin/pip install -r requirements-frozen.txt - #Fix current websocket version error (2019-02-14) - venv/bin/pip uninstall -y websockets - venv/bin/pip install 'websockets>=6.0,<7.0' popd #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 392ee1a..677b0ec 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -28,35 +28,6 @@ ynh_script_progression --message="Checking version..." upgrade_type=$(ynh_check_app_version_changed) -#================================================= -# ENSURE DOWNWARD COMPATIBILITY -#================================================= -ynh_script_progression --message="Ensuring downward compatibility..." - -# If port doesn't exist, create it -if [ -z "$port" ]; then - port=4242 - ynh_app_setting_set --app=$app --key=port --value=$port -fi - -if [[ ! -d "$final_path/.git/" ]] -then - git init "$final_path" - pushd "$final_path" - git remote add origin "$yunorunner_repository" - popd -fi - -# Cleaning legacy permissions -if ynh_legacy_permissions_exists; then - ynh_legacy_permissions_delete_all - - ynh_app_setting_delete --app=$app --key=is_public -fi - -# Remove Pythonz -ynh_secure_remove --file="$final_path/.pythonz" - #================================================= # CLOSE A PORT #================================================= @@ -96,13 +67,42 @@ ynh_script_progression --message="Stopping a systemd service..." ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" --line_match="Stopped YunoRunner CI" +#================================================= +# ENSURE DOWNWARD COMPATIBILITY +#================================================= +ynh_script_progression --message="Ensuring downward compatibility..." + +# If port doesn't exist, create it +if [ -z "$port" ]; then + port=4242 + ynh_app_setting_set --app=$app --key=port --value=$port +fi + +if [[ ! -d "$final_path/.git/" ]] +then + git init "$final_path" + pushd "$final_path" + git remote add origin "$yunorunner_repository" + popd +fi + +# Cleaning legacy permissions +if ynh_legacy_permissions_exists; then + ynh_legacy_permissions_delete_all + + ynh_app_setting_delete --app=$app --key=is_public +fi + +# Remove Pythonz +ynh_secure_remove --file="$final_path/.pythonz" + #================================================= # CREATE DEDICATED USER #================================================= ynh_script_progression --message="Making sure dedicated system user exists..." # Create a dedicated user (if not existing) -ynh_system_user_create --username=$app --home_dir="$final_path" +ynh_system_user_create --username=$app --home_dir=$final_path #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -149,9 +149,6 @@ pushd $final_path python3 -m venv venv venv/bin/pip install --upgrade pip venv/bin/pip install -r requirements-frozen.txt - #Fix current websocket version error (2019-02-14) - venv/bin/pip uninstall -y websockets - venv/bin/pip install 'websockets>=6.0,<7.0' popd #=================================================