Skip to content

Commit

Permalink
Merge pull request #173 from YunoHost/simplestreams
Browse files Browse the repository at this point in the history
  • Loading branch information
Salamandar authored Oct 13, 2024
2 parents 132fcbf + 07d54ae commit 9cec49e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The test results are printed directly in the terminal and stored in the log file
- make sure your user is in the `lxd` or `incus-admin` group (`sudo usermod -a -G lxd MYUSER`)
- **restart your computer**: this will ensure you have indeed the permissions, and that LXD/Incus can access the BTRFS kernel module
- make sure LXC/Incus is initialized with `lxd init` or `incus admin init --minimal`; in the case of LXD, make sure to use the `btrfs` storage driver unless you know what you are doing
- if using LXD, run this command to add the Yunohost image repository: `lxc remote add yunohost https://devbaseimgs.yunohost.org --public`; at the time this README is written, fingerprint is `d9ae6e76c374e3c58c3c20a881cffe7435809adb3b222ec393805f5bd01bb522`
- if using LXD, run this command to add the Yunohost image repository: `lxc remote add yunohost https://repo.yunohost.org/incus --protocol simplestreams --public`; at the time this README is written, fingerprint is `d9ae6e76c374e3c58c3c20a881cffe7435809adb3b222ec393805f5bd01bb522`

<details>
<summary><b>More details about LXD/Incus settings</b></summary>
Expand Down Expand Up @@ -87,7 +87,7 @@ The app is expected to contain a `tests.toml` file (see below) to tell package_c
-r, --rebuild (Re)Build the base container
(N.B.: you're not supposed to use this option,
images are supposed to be fetch from
devbaseimgs.yunohost.org automatically)
https://repo.yunohost.org/incus automatically)
-h, --help Display this help
```

Expand Down
12 changes: 8 additions & 4 deletions lib/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ DEFAULT_PHP_VERSION=${DEFAULT_PHP_VERSION:-7.4}
YNH_BRANCH=${YNH_BRANCH:-stable}

WORKER_ID=${WORKER_ID:-0}
LXC_BASE="ynh-appci-$DIST-$ARCH-$YNH_BRANCH-base"
LXC_BASE="yunohost/$DIST-$YNH_BRANCH/appci"
LXC_NAME="ynh-appci-$DIST-$ARCH-$YNH_BRANCH-test-${WORKER_ID}"

readonly lock_file="./pcheck-${WORKER_ID}.lock"
Expand Down Expand Up @@ -79,9 +79,13 @@ function check_incus_setup()

function set_incus_remote()
{
configured=$(incus remote list -f json | jq 'has("yunohost")')
if [[ "$configured" != "true" ]]; then
incus remote add yunohost https://devbaseimgs.yunohost.org --public
remote_url=$(incus remote list -f json | jq '.yunohost.Addr')
if [[ "${remote_url}" == *"devbaseimgs"* ]]; then
incus remote remove yunohost
remote_url=null
fi
if [[ "$remote_url" == "null" ]]; then
incus remote add yunohost https://repo.yunohost.org/incus --protocol simplestream --public
fi
}

Expand Down
2 changes: 1 addition & 1 deletion package_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ print_help() {
-r, --rebuild (Re)Build the base container
(N.B.: you're not supposed to use this option,
images are supposed to be fetch from
devbaseimgs.yunohost.org automatically)
repo.yunohost.org/incus automatically)
-S, --storage-dir DIRECTORY Where to store temporary test files like yunohost backups
-h, --help Display this help
Expand Down

0 comments on commit 9cec49e

Please sign in to comment.