C2(authentik-source-build): impl move test-build.nix to card docs
Move the ad-hoc test harness out of the repo and into the Mikado card documentation where it belongs — it's a testing recipe, not shipped code. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
0725ae0657
commit
fdcfc7b881
2 changed files with 24 additions and 11 deletions
|
|
@ -1,11 +0,0 @@
|
|||
# Test harness for building authentik components on ringtail
|
||||
# Usage: nix-build test-build.nix -A client-go --extra-experimental-features 'nix-command flakes'
|
||||
let
|
||||
pkgs = (builtins.getFlake "nixpkgs").legacyPackages.x86_64-linux;
|
||||
sources = import ./sources.nix { inherit pkgs; };
|
||||
in
|
||||
{
|
||||
client-go = import ./client-go.nix { inherit pkgs sources; };
|
||||
client-ts = import ./client-ts.nix { inherit pkgs sources; };
|
||||
api-go-vendor-hook = import ./api-go-vendor-hook.nix { inherit pkgs sources; };
|
||||
}
|
||||
|
|
@ -34,6 +34,30 @@ Both clients are generated from the same `schema.yml` OpenAPI spec in the main a
|
|||
- TypeScript client replaces `web/node_modules/@goauthentik/api/` in the web UI build
|
||||
- The nixpkgs derivation patches the generated Go client (`client-go-config.patch`) — check if still needed
|
||||
|
||||
## Testing on Ringtail
|
||||
|
||||
Use this ad-hoc `test-build.nix` harness (not committed to the repo):
|
||||
|
||||
```nix
|
||||
# test-build.nix
|
||||
let
|
||||
pkgs = (builtins.getFlake "nixpkgs").legacyPackages.x86_64-linux;
|
||||
sources = import ./sources.nix { inherit pkgs; };
|
||||
in
|
||||
{
|
||||
client-go = import ./client-go.nix { inherit pkgs sources; };
|
||||
client-ts = import ./client-ts.nix { inherit pkgs sources; };
|
||||
api-go-vendor-hook = import ./api-go-vendor-hook.nix { inherit pkgs sources; };
|
||||
}
|
||||
```
|
||||
|
||||
```fish
|
||||
set tmpdir (ssh ringtail 'mktemp -d /tmp/authentik-test.XXXXXX')
|
||||
scp containers/authentik/*.nix ringtail:$tmpdir/
|
||||
ssh ringtail "cd $tmpdir && nix-build test-build.nix -A client-go --extra-experimental-features 'nix-command flakes'"
|
||||
ssh ringtail "rm -rf $tmpdir"
|
||||
```
|
||||
|
||||
## Related
|
||||
|
||||
- [[build-authentik-from-source]] — Parent goal
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue