mirror of
https://github.com/YunoHost/package_check.git
synced 2024-09-03 20:06:20 +02:00
Proposed cleanup for README.md
This commit is contained in:
parent
dd95b3dbeb
commit
03e044d39b
1 changed files with 55 additions and 36 deletions
27
README.md
27
README.md
|
@ -8,6 +8,7 @@ The `package_check.sh` script perform a series of tests on a package for verify
|
|||
The test results are printed directly in the terminal and stored in the log file Test_results.log
|
||||
|
||||
The script is able to perform the following tests:
|
||||
|
||||
- [Linter](https://github.com/YunoHost/package_linter)
|
||||
- Install/remove/reinstall at the root of a domain (`domain.tld/`)
|
||||
- Install/remove/reinstall in a subpath (`domain.tld/foobar`)
|
||||
|
@ -64,6 +65,7 @@ to propagate (sigh))
|
|||
Then you shall initialize LXD which will ask you a bunch of question. Usually
|
||||
answering the default (just pressing enter) to all questions is fine. Just pay
|
||||
attention to :
|
||||
|
||||
- the storage backend driver. Possibly `zfs` is the best, but requires a kernel >= 5.x
|
||||
and corresponding kernel module loaded. You can fallback to the `dir` driver.
|
||||
- the size of the default storage it'll create (the default is 5G but you may
|
||||
|
@ -109,6 +111,7 @@ lxc image export images:debian/buster/armhf
|
|||
```
|
||||
|
||||
This command will create two files.
|
||||
|
||||
- rootfs.squashfs
|
||||
- lxd.tar.xz
|
||||
|
||||
|
@ -136,14 +139,18 @@ lxc exec inspired-lamprey -- dpkg --print-architecture
|
|||
If the `build_base_lxc.sh` script detects that you are trying a cross container architecture, it will try to perform this hack
|
||||
|
||||
## Syntax of `check_process`
|
||||
|
||||
> Except spaces, the syntax of this file must be respected.
|
||||
|
||||
```
|
||||
;; Default test serie
|
||||
# Comment ignored
|
||||
; pre-install
|
||||
set -euxo pipefail
|
||||
echo -n "Here your commands to execute in the container"
|
||||
echo ", before each installation of the app."
|
||||
; pre-upgrade
|
||||
set -euxo pipefail
|
||||
; Manifest
|
||||
# You need to provide default values for installation parameters ...
|
||||
# EXCEPT for special args: domain, path, admin, and is_public
|
||||
|
@ -181,38 +188,46 @@ If the `build_base_lxc.sh` script detects that you are trying a cross container
|
|||
```
|
||||
|
||||
### `;; Default test serie`
|
||||
|
||||
A name for the series of tests to perform.
|
||||
It's possible to create multiple tests series, all with the same syntax.
|
||||
All different series will be performed sequentially.
|
||||
|
||||
### `; pre-install`
|
||||
*Optional instruction*
|
||||
|
||||
_Optional instruction_
|
||||
If you have to execute a command or a group of commands before the installation. You can use this instruction.
|
||||
All the commands added after the instruction `; pre-install` will be executed in the container before each installation of the app.
|
||||
|
||||
### `; Manifest`
|
||||
|
||||
List of manifest keys.
|
||||
All manifest keys need to be filled to perform the installation.
|
||||
|
||||
> The manifest keys already in the file here are simply examples. Check the package manifest.
|
||||
|
||||
### `; Actions`
|
||||
|
||||
List of arguments for each action that needs an argument.
|
||||
`action_argument` is the name of the argument, as you can find at the end of [action.arguments.**action_argument**].
|
||||
`arg1|arg2` are the different arguments to use for the tests. You can have as many arguments as you want, each separated by `|`.
|
||||
|
||||
*Only `actions.toml` can be tested by package_check, not `actions.json`.*
|
||||
_Only `actions.toml` can be tested by package_check, not `actions.json`._
|
||||
|
||||
### `; Config_panel`
|
||||
|
||||
List of arguments for each config_panel configuration.
|
||||
`main.categorie.config_example` is the complete toml entry for the argument of a configuration.
|
||||
`arg1|arg2` are the different arguments to use for the tests. You can as many arguments as you want, each separated by `|`.
|
||||
|
||||
*Only `config_panel.toml` can be tested by package_check, not `config_panel.json`.*
|
||||
_Only `config_panel.toml` can be tested by package_check, not `config_panel.json`._
|
||||
|
||||
### `; Checks`
|
||||
|
||||
List of tests to perform.
|
||||
Each test set to 1 will be performed by the script.
|
||||
If a test is not in the list, it will be ignored. It's similar to set the test at 0.
|
||||
|
||||
- `pkg_linter`: Check the package with [package linter](https://github.com/YunoHost/package_linter)
|
||||
- `setup_root`: Installation at the root of a domain.
|
||||
- `setup_sub_dir`: Installation in a path.
|
||||
|
@ -230,14 +245,18 @@ If a test is not in the list, it will be ignored. It's similar to set the test a
|
|||
- `config_panel`: All configurations available in config_panel.toml
|
||||
|
||||
### `;;; Upgrade options`
|
||||
*Optional instruction*
|
||||
|
||||
_Optional instruction_
|
||||
For each specified commit for an upgrade, allow to give a name for this version and the manifest parameters which will be used for the preliminary installation.
|
||||
If there's no name specified, the commit will be used.
|
||||
And if there's no manifest arguments, the default arguments of the check process will be used.
|
||||
|
||||
> 3 variables have to be used for the arguments of the manifest, DOMAIN, PATH and USER.
|
||||
|
||||
---
|
||||
|
||||
The `package_check.sh` script accept 6 arguments in addition of the package to be checked.
|
||||
|
||||
- `--branch=branch-name`: Check a branch of the repository instead of master. Allow to check a pull request.
|
||||
You can use an url with a branch, https://github.com/YunoHost-Apps/APP_ynh/tree/my_branch, to implicitly use this argument.
|
||||
- `--interactive`: Wait for user input between each tests
|
||||
|
|
Loading…
Add table
Reference in a new issue