diff --git a/README.md b/README.md index 6732514..aef1686 100644 --- a/README.md +++ b/README.md @@ -1,52 +1,52 @@ + + # YunoRunner for YunoHost [![Integration level](https://dash.yunohost.org/integration/yunorunner.svg)](https://dash.yunohost.org/appci/app/yunorunner) ![](https://ci-apps.yunohost.org/ci/badges/yunorunner.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/yunorunner.maintain.svg) [![Install YunoRunner with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=yunorunner) -> *This package allows you to install YunoRunner quickly and simply on a YunoHost server. +*[Lire ce readme en français.](./README_fr.md)* + +> *This package allows you to install YunoRunner quickly and simply on a YunoHost server. If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.* ## Overview -YunoRunner is our own CI runner for YunoHost Apps -**Shipped version:** 2021-09-22 +CI runner of YunoHost + +**Shipped version:** 2021-09-22~ynh2 + + ## Screenshots -![](https://user-images.githubusercontent.com/30271971/52810447-e06b5600-3092-11e9-9853-fb46e46fda65.PNG) +![](./doc/screenshots/screenshot1.png) -## Demo - -* [Official demo](https://ci-apps.yunohost.org) - -## YunoHost specific features - -#### Supported architectures - -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/yunorunner.svg)](https://ci-apps.yunohost.org/ci/apps/yunorunner/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/yunorunner.svg)](https://ci-apps-arm.yunohost.org/ci/apps/yunorunner/) +## Disclaimers / important information ## Limitations -* 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` +* You need to install [CI_package_check](https://github.com/YunoHost/CI_package_check) using the `install.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` -## Links +## Documentation and resources - * Report a bug: https://github.com/YunoHost-Apps/yunorunner_ynh_core/issues - * App website: https://github.com/YunoHost/yunorunner - * Upstream app repository: https://github.com/YunoHost/yunorunner - * YunoHost website: https://yunohost.org/ - ---- +* Upstream app code repository: https://github.com/YunoHost/yunorunner +* YunoHost documentation for this app: https://yunohost.org/app_yunorunner +* Report a bug: https://github.com/YunoHost-Apps/yunorunner_ynh/issues ## Developer info -Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/yunorunner_ynh_core/tree/testing). +Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/yunorunner_ynh/tree/testing). To try the testing branch, please proceed like that. ``` -sudo yunohost app install https://github.com/YunoHost-Apps/yunorunner_ynh_core/tree/testing --debug +sudo yunohost app install https://github.com/YunoHost-Apps/yunorunner_ynh/tree/testing --debug or -sudo yunohost app upgrade yunorunner -u https://github.com/YunoHost-Apps/yunorunner_ynh_core/tree/testing --debug +sudo yunohost app upgrade yunorunner -u https://github.com/YunoHost-Apps/yunorunner_ynh/tree/testing --debug ``` + +**More info regarding app packaging:** https://yunohost.org/packaging_apps \ No newline at end of file diff --git a/README_fr.md b/README_fr.md new file mode 100644 index 0000000..07b170d --- /dev/null +++ b/README_fr.md @@ -0,0 +1,48 @@ +# YunoRunner pour YunoHost + +[![Niveau d'intégration](https://dash.yunohost.org/integration/yunorunner.svg)](https://dash.yunohost.org/appci/app/yunorunner) ![](https://ci-apps.yunohost.org/ci/badges/yunorunner.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/yunorunner.maintain.svg) +[![Installer YunoRunner avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=yunorunner) + +*[Read this readme in english.](./README.md)* +*[Lire ce readme en français.](./README_fr.md)* + +> *Ce package vous permet d'installer YunoRunner rapidement et simplement sur un serveur YunoHost. +Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* + +## Vue d'ensemble + +Runner d'intégration continue de YunoHost + +**Version incluse :** 2021-09-22~ynh2 + + + +## Captures d'écran + +![](./doc/screenshots/screenshot1.png) + +## Avertissements / informations importantes + +## Limitations + +* You need to install [CI_package_check](https://github.com/YunoHost/CI_package_check) using the `install.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` + +## Documentations et ressources + +* Dépôt de code officiel de l'app : https://github.com/YunoHost/yunorunner +* Documentation YunoHost pour cette app : https://yunohost.org/app_yunorunner +* Signaler un bug : https://github.com/YunoHost-Apps/yunorunner_ynh/issues + +## Informations pour les développeurs + +Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/yunorunner_ynh/tree/testing). + +Pour essayer la branche testing, procédez comme suit. +``` +sudo yunohost app install https://github.com/YunoHost-Apps/yunorunner_ynh/tree/testing --debug +ou +sudo yunohost app upgrade yunorunner -u https://github.com/YunoHost-Apps/yunorunner_ynh/tree/testing --debug +``` + +**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps \ No newline at end of file diff --git a/check_process b/check_process index 03d9e18..b1c6db7 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 @@ -18,6 +18,8 @@ # upgrade=1 from_commit=7b3acfc9b28b6ed33a1590ae16261d7dd3b5b06a # 2021-03-05~ynh1 upgrade=1 from_commit=f0e9373aa2403bf04f84c67646ac5d34376b7959 + # 2021-09-22~ynh1 + upgrade=1 from_commit=fea498cd83a7da12a102efe2f47397dace3cddda backup_restore=1 multi_instance=1 port_already_use=1 (4242) @@ -33,3 +35,5 @@ Notification=down name=041120 ; commit=f0e9373aa2403bf04f84c67646ac5d34376b7959 name=2021-03-05~ynh1 + ; commit=fea498cd83a7da12a102efe2f47397dace3cddda + name=2021-09-22~ynh1 diff --git a/conf/nginx.conf b/conf/nginx.conf index 043af6c..9995880 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,27 +1,26 @@ #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; location __PATH__/ { - alias __FINALPATH__/; - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } + if ($scheme = http) { + rewrite ^ https://$server_name$request_uri? permanent; + } - proxy_pass http://127.0.0.1:__PORT__/; + proxy_pass http://127.0.0.1:__PORT__/; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "Upgrade"; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; - # Include SSOWAT user panel. - include conf.d/yunohost_panel.conf.inc; + # 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; - } + 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..75994f3 --- /dev/null +++ b/doc/DISCLAIMER.md @@ -0,0 +1,4 @@ +## Limitations + +* You need to install [CI_package_check](https://github.com/YunoHost/CI_package_check) using the `install.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 3b420c7..0cd1b55 100644 --- a/manifest.json +++ b/manifest.json @@ -6,8 +6,12 @@ "en": "CI runner of YunoHost", "fr": "Runner d'intégration continue de YunoHost" }, - "version": "2021-09-22~ynh1", + "version": "2021-09-22~ynh2", "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/install b/scripts/install index f33c59b..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 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/upgrade b/scripts/upgrade index 1d7d5eb..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