Scaffold Cloudron packaging workspace

This commit is contained in:
2025-10-02 13:39:36 -05:00
parent 482d4ff1b8
commit fe0ade1dd9
366 changed files with 4035 additions and 2493 deletions

View File

@@ -1,33 +1,20 @@
# Local Test Harness
All verification runs locally inside Docker containers so your workstation matches the eventual Gitea Actions runner exactly.
All verification runs through the wrapper scripts under `run/`, ensuring every command executes in Docker.
## CI-equivalent container
## Devtools checks
- `docker/ci-runner/Dockerfile` builds the image `knel/cloudron-ci`, derived from the same base the Gitea runner will use.
- `scripts/ci_local.sh` orchestrates tasks inside that container. Run `BUILD=1 ./scripts/ci_local.sh lint` the first time to build the image.
- Tasks:
- `lint``make lint` + `make status` + `git diff docs/APP_STATUS.md`
- `packager-smoke` → builds `docker/packager` and runs `cloudron --help`
- `all` (default) → runs both.
The script mounts `/var/run/docker.sock` so Docker CLI calls inside the container reuse the host daemon.
## Git hooks
Use `scripts/hooks/install_hooks.sh` to install local hooks:
Use `./run/dev.sh` for linting and documentation updates:
```bash
./scripts/hooks/install_hooks.sh
./run/dev.sh python scripts/lint_repo.py --slug apache-apisix --strict
./run/dev.sh python scripts/generate_status.py --preserve-timestamp
```
- `pre-commit` runs `./scripts/ci_local.sh lint`.
- `post-commit` refreshes `docs/APP_STATUS.md` (non-fatal).
- `pre-push` runs the packager smoke test.
## Packaging shell
Set `SKIP_CI_HOOKS=1` when you need to bypass the hooks temporarily.
Invoke `./run/packager.sh` (optionally with `BUILD=1`) when you need the Cloudron CLI to build, install, or push packages.
## Alignment with Gitea Actions
The `.gitea/workflows/ci.yml` workflow wraps the same `scripts/ci_local.sh` entrypoint and is currently manual-only (`workflow_dispatch`). Enable push/PR triggers once a runner is provisioned.
## CI parity
The Gitea workflow calls the same commands via the devtools image. To mimic it locally, run the lint/status commands above followed by any smoke tests inside the packager shell.