Skip to main content

CI for YunoHost to test YunoHost packages ;)

Project description

ci_ynh for YunoHost

Integration level Install ci_ynh with YunoHost

This package allows you to install ci_ynh quickly and simply on a YunoHost server. If you don't have YunoHost, please consult the guide to learn how to install it.

Experimental and currently not working ;)

Pull requests welcome ;)

Discuss: https://forum.yunohost.org/t/ci-ynh-package-check-as-yunohost-app-using-django/13894

Overview

ci_ynh CI to check YunoHost packages on self hosted YunoHost instance, using Python/Django.

Links


Developer info

package installation / debugging

Please send your pull request to https://github.com/YunoHost-Apps/ci_ynh

Try 'main' branch, e.g.:

sudo yunohost app install https://github.com/YunoHost-Apps/ci_ynh/tree/master --debug
or
sudo yunohost app upgrade ci_ynh -u https://github.com/YunoHost-Apps/ci_ynh/tree/master --debug

Try 'testing' branch, e.g.:

sudo yunohost app install https://github.com/YunoHost-Apps/ci_ynh/tree/testing --debug
or
sudo yunohost app upgrade ci_ynh -u https://github.com/YunoHost-Apps/ci_ynh/tree/testing --debug

To remove call e.g.:

sudo yunohost app remove ci_ynh

Run manual CI check. e.g.:

root@yunohost:~# cd /opt/yunohost/ci_ynh/
root@yunohost:/opt/yunohost/ci_ynh# source venv/bin/activate
(venv) root@yunohost:/opt/yunohost/ci_ynh# ./manage.py ci_run django_ynh

Backup / remove / restore cycle, e.g.:

yunohost backup create --apps ci_ynh
yunohost backup list
archives:
  - ci_ynh-pre-upgrade1
  - 20201223-163434
yunohost app remove ci_ynh
yunohost backup restore 20201223-163434 --apps ci_ynh

Debug installation, e.g.:

root@yunohost:~# ls -la /var/www/ci_ynh/
total 18
drwxr-xr-x 4 root root 4 Dec  8 08:36 .
drwxr-xr-x 6 root root 6 Dec  8 08:36 ..
drwxr-xr-x 2 root root 2 Dec  8 08:36 media
drwxr-xr-x 7 root root 8 Dec  8 08:40 static

root@yunohost:~# ls -la /opt/yunohost/ci_ynh/
total 58
drwxr-xr-x 5 ci_ynh ci_ynh   11 Dec  8 08:39 .
drwxr-xr-x 3 root        root           3 Dec  8 08:36 ..
-rw-r--r-- 1 ci_ynh ci_ynh  460 Dec  8 08:39 gunicorn.conf.py
-rw-r--r-- 1 ci_ynh ci_ynh    0 Dec  8 08:39 local_settings.py
-rwxr-xr-x 1 ci_ynh ci_ynh  274 Dec  8 08:39 manage.py
-rw-r--r-- 1 ci_ynh ci_ynh  171 Dec  8 08:39 secret.txt
drwxr-xr-x 6 ci_ynh ci_ynh    6 Dec  8 08:37 venv
-rw-r--r-- 1 ci_ynh ci_ynh  115 Dec  8 08:39 wsgi.py
-rw-r--r-- 1 ci_ynh ci_ynh 4737 Dec  8 08:39 settings.py

root@yunohost:~# cd /opt/yunohost/ci_ynh/
root@yunohost:/opt/yunohost/ci_ynh# source venv/bin/activate
(venv) root@yunohost:/opt/yunohost/ci_ynh# ./manage.py check
ci_ynh v0.8.2 (Django v2.2.17)
DJANGO_SETTINGS_MODULE='settings'
PROJECT_PATH:/opt/yunohost/ci_ynh/venv/lib/python3.7/site-packages
BASE_PATH:/opt/yunohost/ci_ynh
System check identified no issues (0 silenced).

root@yunohost:~# tail -f /var/log/ci_ynh/ci_ynh.log
root@yunohost:~# cat /etc/systemd/system/ci_ynh.service

root@yunohost:~# systemctl reload-or-restart ci_ynh
root@yunohost:~# journalctl --unit=ci_ynh --follow

local test

For quicker developing of ci_ynh in the context of YunoHost app, it's possible to run the Django developer server with the settings and urls made for YunoHost installation.

e.g.:

~$ git clone https://github.com/YunoHost-Apps/ci_ynh.git
~$ cd ci_ynh/
~/ci_ynh$ make
install-poetry         install or update poetry
install                install ci_ynh via poetry
update                 update the sources and installation
local-test             Run local_test.py to run ci_ynh locally
~/ci_ynh$ make install-poetry
~/ci_ynh$ make install
~/ci_ynh$ make local-test

Notes:

  • SQlite database will be used
  • A super user with username test and password test is created
  • The page is available under http://127.0.0.1:8000/app_path/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ci_ynh-0.1.0a1.tar.gz (21.7 kB view details)

Uploaded Source

Built Distribution

ci_ynh-0.1.0a1-py3-none-any.whl (21.5 kB view details)

Uploaded Python 3

File details

Details for the file ci_ynh-0.1.0a1.tar.gz.

File metadata

  • Download URL: ci_ynh-0.1.0a1.tar.gz
  • Upload date:
  • Size: 21.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.8.5

File hashes

Hashes for ci_ynh-0.1.0a1.tar.gz
Algorithm Hash digest
SHA256 d947add8d8136c68ccd42c75a968725d4a03c92c47a347b2f33016cac6d784e9
MD5 62fb34a1b73e5fe68c2ea876094554e1
BLAKE2b-256 2a646824cceca5effd85bdb6b0afbf35375db50c034546fccadd2cd2c6cf92ed

See more details on using hashes here.

File details

Details for the file ci_ynh-0.1.0a1-py3-none-any.whl.

File metadata

  • Download URL: ci_ynh-0.1.0a1-py3-none-any.whl
  • Upload date:
  • Size: 21.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.8.5

File hashes

Hashes for ci_ynh-0.1.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 4890cdb017e2ff570b313899cb45a9f4458ccb1c217d729e493b09a205f94195
MD5 5be4083a87d227bcac90ad61f080df3d
BLAKE2b-256 cbdb35ef59126cf09bbde7488f2f5dcd7ad99deedd1d354470bb752bdaa75fde

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page