|
| 1 | +# Docker setup for cardano-node-tests (Antithesis/Moog) |
| 2 | + |
| 3 | +This directory contains the driver image and compose file for submitting |
| 4 | +`cardano-node-tests` to Antithesis via the Moog platform. |
| 5 | + |
| 6 | +## How it works |
| 7 | + |
| 8 | +- `Dockerfile` — minimal image: configures Nix and copies the repo into |
| 9 | + `/work/`. No binaries are pre-built; `regression.sh` handles all setup at |
| 10 | + runtime via its own Nix shebang. |
| 11 | +- `docker-compose.yaml` — single `driver` service for Moog submission. |
| 12 | + |
| 13 | +## Workflow |
| 14 | + |
| 15 | +### 1. Build and push the image |
| 16 | + |
| 17 | +```bash |
| 18 | +docker build -f docker/Dockerfile \ |
| 19 | + --build-arg GIT_REVISION=$(git rev-parse HEAD) \ |
| 20 | + -t ghcr.io/intersectmbo/cardano-node-tests-antithesis:latest . |
| 21 | + |
| 22 | +docker push ghcr.io/intersectmbo/cardano-node-tests-antithesis:latest |
| 23 | +``` |
| 24 | + |
| 25 | +### 2. Validate the compose locally |
| 26 | + |
| 27 | +```bash |
| 28 | +docker compose -f docker/docker-compose.yaml config |
| 29 | +docker compose -f docker/docker-compose.yaml up --build |
| 30 | +``` |
| 31 | + |
| 32 | +### 3. Submit to Moog |
| 33 | + |
| 34 | +```bash |
| 35 | +moog requester create-test \ |
| 36 | + --platform github \ |
| 37 | + --username saratomaz \ |
| 38 | + --repository IntersectMBO/cardano-node-tests \ |
| 39 | + --directory ./docker \ |
| 40 | + --commit $(git rev-parse HEAD) \ |
| 41 | + --try 1 \ |
| 42 | + --duration 2 |
| 43 | +``` |
| 44 | + |
| 45 | +## Environment variables |
| 46 | + |
| 47 | +| Variable | Default | Description | |
| 48 | +|-------------------|------------|------------------------------------------| |
| 49 | +| `NODE_REV` | `master` | cardano-node git revision | |
| 50 | +| `CARDANO_CLI_REV` | (built-in) | cardano-cli revision, empty = use node's | |
| 51 | +| `DBSYNC_REV` | (disabled) | db-sync revision, empty = disabled | |
| 52 | +| `RUN_TARGET` | `tests` | `tests`, `testpr`, or `testnets` | |
| 53 | +| `MARKEXPR` | | pytest marker expression | |
| 54 | +| `CLUSTERS_COUNT` | | number of local cluster instances | |
| 55 | +| `CLUSTER_ERA` | | e.g. `conway` | |
| 56 | +| `PROTOCOL_VERSION`| | e.g. `11` | |
| 57 | +| `UTXO_BACKEND` | | e.g. `disk`, `mem` | |
0 commit comments