@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 07:15 UTC

main
ts 28 lines 830 Bytes
Raw
1 import * as Kubernetes from "@alchemy.run/kubernetes";
2 import * as Effect from "effect/Effect";
3 import * as Redacted from "effect/Redacted";
4 import { TestLocalCluster } from "./local.ts";
5
6 export const BUILD_SECRET = "alchemy-build-secret-value";
7
8 /**
9 * A one-shot Job built from `buildsecrets/Dockerfile` with a build arg and a
10 * BuildKit secret, pushed to the cluster's registry. It prints the file its
11 * build wrote.
12 */
13 export default Kubernetes.Job(
14 "LocalDockerfileJob",
15 Effect.gen(function* () {
16 const cluster = yield* TestLocalCluster;
17 return {
18 cluster,
19 context: `${import.meta.dirname}/buildsecrets`,
20 build: {
21 args: { GREETING: "hello" },
22 secrets: { token: Redacted.make(BUILD_SECRET) },
23 },
24 name: "local-dockerfile-job",
25 backoffLimit: 0,
26 };
27 }),
28 );