1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/yunorunner_ynh.git synced 2024-09-03 20:36:13 +02:00

Merge pull request #20 from YunoHost-Apps/testing

Example
This commit is contained in:
yalh76 2021-10-05 23:14:01 +02:00 committed by GitHub
commit 2a3e167db4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 140 additions and 80 deletions

View file

@ -1,52 +1,52 @@
<!--
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
It shall NOT be edited by hand.
-->
# YunoRunner for YunoHost # 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) [![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) [![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.* If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.*
## Overview ## 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 ## Screenshots
![](https://user-images.githubusercontent.com/30271971/52810447-e06b5600-3092-11e9-9853-fb46e46fda65.PNG) ![](./doc/screenshots/screenshot1.png)
## Demo ## Disclaimers / important information
* [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/)
## Limitations ## Limitations
* You need to install [CI_package_check](https://github.com/YunoHost/CI_package_check) using the build_CI.sh script before installing YunoRunner * 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` * 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 * Upstream app code repository: https://github.com/YunoHost/yunorunner
* App website: https://github.com/YunoHost/yunorunner * YunoHost documentation for this app: https://yunohost.org/app_yunorunner
* Upstream app repository: https://github.com/YunoHost/yunorunner * Report a bug: https://github.com/YunoHost-Apps/yunorunner_ynh/issues
* YunoHost website: https://yunohost.org/
---
## Developer info ## 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. 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 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

48
README_fr.md Normal file
View file

@ -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

View file

@ -2,8 +2,8 @@
; pre-install ; pre-install
sudo git clone https://github.com/YunoHost/CI_package_check /home/CI_package_check sudo git clone https://github.com/YunoHost/CI_package_check /home/CI_package_check
; Manifest ; Manifest
domain="domain.tld" (DOMAIN) domain="domain.tld"
path="/path" (PATH) path="/path"
; Checks ; Checks
pkg_linter=1 pkg_linter=1
setup_sub_dir=1 setup_sub_dir=1
@ -18,6 +18,8 @@
# upgrade=1 from_commit=7b3acfc9b28b6ed33a1590ae16261d7dd3b5b06a # upgrade=1 from_commit=7b3acfc9b28b6ed33a1590ae16261d7dd3b5b06a
# 2021-03-05~ynh1 # 2021-03-05~ynh1
upgrade=1 from_commit=f0e9373aa2403bf04f84c67646ac5d34376b7959 upgrade=1 from_commit=f0e9373aa2403bf04f84c67646ac5d34376b7959
# 2021-09-22~ynh1
upgrade=1 from_commit=fea498cd83a7da12a102efe2f47397dace3cddda
backup_restore=1 backup_restore=1
multi_instance=1 multi_instance=1
port_already_use=1 (4242) port_already_use=1 (4242)
@ -33,3 +35,5 @@ Notification=down
name=041120 name=041120
; commit=f0e9373aa2403bf04f84c67646ac5d34376b7959 ; commit=f0e9373aa2403bf04f84c67646ac5d34376b7959
name=2021-03-05~ynh1 name=2021-03-05~ynh1
; commit=fea498cd83a7da12a102efe2f47397dace3cddda
name=2021-09-22~ynh1

View file

@ -1,27 +1,26 @@
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/ { location __PATH__/ {
alias __FINALPATH__/;
if ($scheme = http) { if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent; 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_http_version 1.1;
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade"; proxy_set_header Connection "Upgrade";
# Include SSOWAT user panel. # Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc; include conf.d/yunohost_panel.conf.inc;
location __PATH__/logs { location __PATH__/logs {
alias /home/CI_package_check/logs/; alias /home/CI_package_check/logs/;
autoindex on; autoindex on;
} }
location __PATH__/badges/ { location __PATH__/badges/ {
alias /home/CI_package_check/badges/; alias /home/CI_package_check/badges/;
autoindex on; autoindex on;
} }
} }

View file

@ -7,7 +7,7 @@ Type=simple
Restart=always Restart=always
User=__APP__ User=__APP__
Group=__APP__ Group=__APP__
WorkingDirectory=__FINALPATH__ WorkingDirectory=__FINALPATH__/
ExecStart=__FINALPATH__/venv/bin/python ./run.py ExecStart=__FINALPATH__/venv/bin/python ./run.py
[Install] [Install]

0
doc/.gitkeep Normal file
View file

4
doc/DISCLAIMER.md Normal file
View file

@ -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`

0
doc/screenshots/.gitkeep Normal file
View file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

View file

@ -6,8 +6,12 @@
"en": "CI runner of YunoHost", "en": "CI runner of YunoHost",
"fr": "Runner d'intégration continue de 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", "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", "license": "GPL-3.0-or-later",
"maintainer": { "maintainer": {
"name": "" "name": ""

View file

@ -71,7 +71,7 @@ ynh_install_app_dependencies $pkg_dependencies
ynh_script_progression --message="Configuring system user..." ynh_script_progression --message="Configuring system user..."
# Create a 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 # DOWNLOAD, CHECK AND UNPACK SOURCE

View file

@ -26,6 +26,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
# REMOVE SERVICE INTEGRATION IN YUNOHOST # 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 if ynh_exec_warn_less yunohost service status $app >/dev/null
then then
ynh_script_progression --message="Removing $app service integration..." ynh_script_progression --message="Removing $app service integration..."

View file

@ -28,35 +28,6 @@ ynh_script_progression --message="Checking version..."
upgrade_type=$(ynh_check_app_version_changed) 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 # 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" 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 # CREATE DEDICATED USER
#================================================= #=================================================
ynh_script_progression --message="Making sure dedicated system user exists..." ynh_script_progression --message="Making sure dedicated system user exists..."
# Create a dedicated user (if not existing) # 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 # DOWNLOAD, CHECK AND UNPACK SOURCE