-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Expand file tree
/
Copy pathtrigger.config.ts
More file actions
57 lines (55 loc) · 1.46 KB
/
trigger.config.ts
File metadata and controls
57 lines (55 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import { defineConfig } from "@trigger.dev/sdk/v3";
import { syncEnvVars } from "@trigger.dev/build/extensions/core";
import { lightpanda } from "@trigger.dev/build/extensions/lightpanda";
export default defineConfig({
compatibilityFlags: ["run_engine_v2"],
project: "proj_rrkpdguyagvsoktglnod",
experimental_processKeepAlive: {
enabled: true,
maxExecutionsPerProcess: 20,
},
logLevel: "debug",
maxDuration: 3600,
ttl: "1h",
retries: {
enabledInDev: true,
default: {
maxAttempts: 3,
minTimeoutInMs: 1000,
maxTimeoutInMs: 10000,
factor: 2,
randomize: true,
},
},
machine: "small-2x",
build: {
extensions: [
lightpanda(),
syncEnvVars(async (ctx) => {
return [
{ name: "SYNC_ENV", value: ctx.environment },
{ name: "BRANCH", value: ctx.branch ?? "NO_BRANCH" },
{ name: "BRANCH", value: "PARENT", isParentEnv: true },
{ name: "SECRET_KEY", value: "secret-value" },
{ name: "ANOTHER_SECRET", value: "another-secret-value" },
];
}),
{
name: "npm-token",
onBuildComplete: async (context, manifest) => {
if (context.target === "dev") {
return;
}
context.addLayer({
id: "npm-token",
build: {
env: {
NPM_TOKEN: manifest.deploy.env?.NPM_TOKEN,
},
},
});
},
},
],
},
});