rampway 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +183 -0
- package/build/src/cli.d.ts +3 -0
- package/build/src/cli.d.ts.map +1 -0
- package/build/src/cli.js +104 -0
- package/build/src/cli.js.map +1 -0
- package/build/src/commands/context.d.ts +12 -0
- package/build/src/commands/context.d.ts.map +1 -0
- package/build/src/commands/context.js +16 -0
- package/build/src/commands/context.js.map +1 -0
- package/build/src/commands/deploy.d.ts +6 -0
- package/build/src/commands/deploy.d.ts.map +1 -0
- package/build/src/commands/deploy.js +14 -0
- package/build/src/commands/deploy.js.map +1 -0
- package/build/src/commands/doctor.d.ts +14 -0
- package/build/src/commands/doctor.d.ts.map +1 -0
- package/build/src/commands/doctor.js +54 -0
- package/build/src/commands/doctor.js.map +1 -0
- package/build/src/commands/init.d.ts +8 -0
- package/build/src/commands/init.d.ts.map +1 -0
- package/build/src/commands/init.js +42 -0
- package/build/src/commands/init.js.map +1 -0
- package/build/src/commands/plan.d.ts +6 -0
- package/build/src/commands/plan.d.ts.map +1 -0
- package/build/src/commands/plan.js +24 -0
- package/build/src/commands/plan.js.map +1 -0
- package/build/src/commands/releases.d.ts +27 -0
- package/build/src/commands/releases.d.ts.map +1 -0
- package/build/src/commands/releases.js +91 -0
- package/build/src/commands/releases.js.map +1 -0
- package/build/src/commands/rollback.d.ts +6 -0
- package/build/src/commands/rollback.d.ts.map +1 -0
- package/build/src/commands/rollback.js +12 -0
- package/build/src/commands/rollback.js.map +1 -0
- package/build/src/commands/rollbridge.d.ts +21 -0
- package/build/src/commands/rollbridge.d.ts.map +1 -0
- package/build/src/commands/rollbridge.js +69 -0
- package/build/src/commands/rollbridge.js.map +1 -0
- package/build/src/commands/validate.d.ts +6 -0
- package/build/src/commands/validate.d.ts.map +1 -0
- package/build/src/commands/validate.js +12 -0
- package/build/src/commands/validate.js.map +1 -0
- package/build/src/config/load-config.d.ts +10 -0
- package/build/src/config/load-config.d.ts.map +1 -0
- package/build/src/config/load-config.js +71 -0
- package/build/src/config/load-config.js.map +1 -0
- package/build/src/config/validate-config.d.ts +7 -0
- package/build/src/config/validate-config.d.ts.map +1 -0
- package/build/src/config/validate-config.js +117 -0
- package/build/src/config/validate-config.js.map +1 -0
- package/build/src/core/deploy-runner.d.ts +46 -0
- package/build/src/core/deploy-runner.d.ts.map +1 -0
- package/build/src/core/deploy-runner.js +221 -0
- package/build/src/core/deploy-runner.js.map +1 -0
- package/build/src/core/expo-web-artifacts.d.ts +10 -0
- package/build/src/core/expo-web-artifacts.d.ts.map +1 -0
- package/build/src/core/expo-web-artifacts.js +16 -0
- package/build/src/core/expo-web-artifacts.js.map +1 -0
- package/build/src/core/git-source.d.ts +22 -0
- package/build/src/core/git-source.d.ts.map +1 -0
- package/build/src/core/git-source.js +63 -0
- package/build/src/core/git-source.js.map +1 -0
- package/build/src/core/health-checks.d.ts +8 -0
- package/build/src/core/health-checks.d.ts.map +1 -0
- package/build/src/core/health-checks.js +19 -0
- package/build/src/core/health-checks.js.map +1 -0
- package/build/src/core/hooks.d.ts +12 -0
- package/build/src/core/hooks.d.ts.map +1 -0
- package/build/src/core/hooks.js +26 -0
- package/build/src/core/hooks.js.map +1 -0
- package/build/src/core/locks.d.ts +16 -0
- package/build/src/core/locks.d.ts.map +1 -0
- package/build/src/core/locks.js +32 -0
- package/build/src/core/locks.js.map +1 -0
- package/build/src/core/node-package-tasks.d.ts +26 -0
- package/build/src/core/node-package-tasks.d.ts.map +1 -0
- package/build/src/core/node-package-tasks.js +143 -0
- package/build/src/core/node-package-tasks.js.map +1 -0
- package/build/src/core/path-change-gate.d.ts +15 -0
- package/build/src/core/path-change-gate.d.ts.map +1 -0
- package/build/src/core/path-change-gate.js +95 -0
- package/build/src/core/path-change-gate.js.map +1 -0
- package/build/src/core/paths.d.ts +7 -0
- package/build/src/core/paths.d.ts.map +1 -0
- package/build/src/core/paths.js +20 -0
- package/build/src/core/paths.js.map +1 -0
- package/build/src/core/redaction.d.ts +22 -0
- package/build/src/core/redaction.d.ts.map +1 -0
- package/build/src/core/redaction.js +39 -0
- package/build/src/core/redaction.js.map +1 -0
- package/build/src/core/release-id.d.ts +6 -0
- package/build/src/core/release-id.d.ts.map +1 -0
- package/build/src/core/release-id.js +20 -0
- package/build/src/core/release-id.js.map +1 -0
- package/build/src/core/release-manager.d.ts +49 -0
- package/build/src/core/release-manager.d.ts.map +1 -0
- package/build/src/core/release-manager.js +115 -0
- package/build/src/core/release-manager.js.map +1 -0
- package/build/src/core/task-runner.d.ts +38 -0
- package/build/src/core/task-runner.d.ts.map +1 -0
- package/build/src/core/task-runner.js +102 -0
- package/build/src/core/task-runner.js.map +1 -0
- package/build/src/core/velocious-migrate.d.ts +11 -0
- package/build/src/core/velocious-migrate.d.ts.map +1 -0
- package/build/src/core/velocious-migrate.js +20 -0
- package/build/src/core/velocious-migrate.js.map +1 -0
- package/build/src/runtimes/index.d.ts +56 -0
- package/build/src/runtimes/index.d.ts.map +1 -0
- package/build/src/runtimes/index.js +132 -0
- package/build/src/runtimes/index.js.map +1 -0
- package/build/src/runtimes/none-runtime.d.ts +22 -0
- package/build/src/runtimes/none-runtime.d.ts.map +1 -0
- package/build/src/runtimes/none-runtime.js +23 -0
- package/build/src/runtimes/none-runtime.js.map +1 -0
- package/build/src/runtimes/rollbridge-runtime.d.ts +137 -0
- package/build/src/runtimes/rollbridge-runtime.d.ts.map +1 -0
- package/build/src/runtimes/rollbridge-runtime.js +224 -0
- package/build/src/runtimes/rollbridge-runtime.js.map +1 -0
- package/build/src/tasks.d.ts +5 -0
- package/build/src/tasks.d.ts.map +1 -0
- package/build/src/tasks.js +5 -0
- package/build/src/tasks.js.map +1 -0
- package/build/src/test-helpers.d.ts +25 -0
- package/build/src/test-helpers.d.ts.map +1 -0
- package/build/src/test-helpers.js +40 -0
- package/build/src/test-helpers.js.map +1 -0
- package/build/src/transports/local-transport.d.ts +67 -0
- package/build/src/transports/local-transport.d.ts.map +1 -0
- package/build/src/transports/local-transport.js +121 -0
- package/build/src/transports/local-transport.js.map +1 -0
- package/build/src/transports/ssh-transport.d.ts +189 -0
- package/build/src/transports/ssh-transport.d.ts.map +1 -0
- package/build/src/transports/ssh-transport.js +369 -0
- package/build/src/transports/ssh-transport.js.map +1 -0
- package/build/src/types.d.ts +290 -0
- package/build/src/types.d.ts.map +1 -0
- package/build/src/types.js +8 -0
- package/build/src/types.js.map +1 -0
- package/docs/config-reference.md +264 -0
- package/docs/migration-from-capistrano.md +167 -0
- package/docs/roadmap.md +27 -0
- package/examples/local/rampway.config.mjs +20 -0
- package/examples/monorepo/rampway.config.mjs +73 -0
- package/package.json +92 -0
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
export type TransportConfig = {
|
|
2
|
+
type: "local" | "ssh";
|
|
3
|
+
host?: string | undefined;
|
|
4
|
+
user?: string | undefined;
|
|
5
|
+
port?: number | undefined;
|
|
6
|
+
identityFile?: string | undefined;
|
|
7
|
+
sshOptions?: string[] | undefined;
|
|
8
|
+
extra?: Record<string, unknown> | undefined;
|
|
9
|
+
};
|
|
10
|
+
export type LinkedEntry = {
|
|
11
|
+
path: string;
|
|
12
|
+
required: boolean;
|
|
13
|
+
};
|
|
14
|
+
export type HealthCheckEntry = {
|
|
15
|
+
name?: string | undefined;
|
|
16
|
+
path?: string | undefined;
|
|
17
|
+
command?: string | undefined;
|
|
18
|
+
};
|
|
19
|
+
export type RuntimeConfig = {
|
|
20
|
+
type: string;
|
|
21
|
+
command?: string | undefined;
|
|
22
|
+
packageDir?: string | undefined;
|
|
23
|
+
config?: string | undefined;
|
|
24
|
+
daemonLogPath?: string | undefined;
|
|
25
|
+
daemonPidPath?: string | undefined;
|
|
26
|
+
daemonStartTimeoutMs?: number | undefined;
|
|
27
|
+
socketPath?: string | undefined;
|
|
28
|
+
versionPath?: string | undefined;
|
|
29
|
+
};
|
|
30
|
+
export type TaskEntry = {
|
|
31
|
+
name?: string | undefined;
|
|
32
|
+
command: string;
|
|
33
|
+
cwd?: string | undefined;
|
|
34
|
+
env?: Record<string, string> | undefined;
|
|
35
|
+
optional?: boolean | undefined;
|
|
36
|
+
onlyIfChanged?: string[] | undefined;
|
|
37
|
+
};
|
|
38
|
+
export type TaskResult = {
|
|
39
|
+
name: string;
|
|
40
|
+
command: string;
|
|
41
|
+
optional?: boolean | undefined;
|
|
42
|
+
status: "passed" | "failed" | "skipped";
|
|
43
|
+
error?: string | undefined;
|
|
44
|
+
skipReason?: string | undefined;
|
|
45
|
+
};
|
|
46
|
+
export type StageConfig = {
|
|
47
|
+
application: string;
|
|
48
|
+
stageName: string;
|
|
49
|
+
repo?: string | undefined;
|
|
50
|
+
branch: string;
|
|
51
|
+
revision?: string | undefined;
|
|
52
|
+
deployTo: string;
|
|
53
|
+
strategy: "local-copy" | "remote-git" | "archive-upload";
|
|
54
|
+
transport: TransportConfig;
|
|
55
|
+
hosts?: {
|
|
56
|
+
host: string;
|
|
57
|
+
user?: string;
|
|
58
|
+
port?: number;
|
|
59
|
+
roles?: string[];
|
|
60
|
+
}[] | undefined;
|
|
61
|
+
keepReleases: number;
|
|
62
|
+
linkedFiles: LinkedEntry[];
|
|
63
|
+
linkedDirs: LinkedEntry[];
|
|
64
|
+
tasks: Record<string, TaskEntry[]>;
|
|
65
|
+
hooks: Record<string, TaskEntry[]>;
|
|
66
|
+
healthChecks: HealthCheckEntry[];
|
|
67
|
+
runtime: RuntimeConfig;
|
|
68
|
+
};
|
|
69
|
+
export type DeployPaths = {
|
|
70
|
+
deployTo: string;
|
|
71
|
+
releasesPath: string;
|
|
72
|
+
sharedPath: string;
|
|
73
|
+
currentPath: string;
|
|
74
|
+
lockPath: string;
|
|
75
|
+
statePath: string;
|
|
76
|
+
reportPath: string;
|
|
77
|
+
releasePath?: string | undefined;
|
|
78
|
+
};
|
|
79
|
+
export type DeployPlanStep = {
|
|
80
|
+
phase: string;
|
|
81
|
+
action: string;
|
|
82
|
+
name?: string | undefined;
|
|
83
|
+
detail: string;
|
|
84
|
+
};
|
|
85
|
+
export type DeployReport = {
|
|
86
|
+
application: string;
|
|
87
|
+
stage: string;
|
|
88
|
+
releaseId: string;
|
|
89
|
+
revision: string;
|
|
90
|
+
branch?: string | undefined;
|
|
91
|
+
deployedAt?: string | undefined;
|
|
92
|
+
event: string;
|
|
93
|
+
durationMs?: number | undefined;
|
|
94
|
+
previousRelease?: string | undefined;
|
|
95
|
+
healthChecks?: string | undefined;
|
|
96
|
+
runtime?: object | undefined;
|
|
97
|
+
cleanupRemoved?: string[] | undefined;
|
|
98
|
+
};
|
|
99
|
+
export type RollbackReport = {
|
|
100
|
+
application: string;
|
|
101
|
+
stage: string;
|
|
102
|
+
releaseId: string;
|
|
103
|
+
rolledBackAt: string;
|
|
104
|
+
previousRelease?: string | undefined;
|
|
105
|
+
event: string;
|
|
106
|
+
};
|
|
107
|
+
export type ReleasesReport = {
|
|
108
|
+
application: string;
|
|
109
|
+
stage: string;
|
|
110
|
+
current: string | null;
|
|
111
|
+
releases: string[];
|
|
112
|
+
releaseCount: number;
|
|
113
|
+
paths: {
|
|
114
|
+
releases: string;
|
|
115
|
+
current: string;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
export type StatusReport = {
|
|
119
|
+
application: string;
|
|
120
|
+
stage: string;
|
|
121
|
+
deployTo: string;
|
|
122
|
+
current: string | null;
|
|
123
|
+
releases: string[];
|
|
124
|
+
releaseCount: number;
|
|
125
|
+
latestRelease: string | undefined;
|
|
126
|
+
paths: {
|
|
127
|
+
current: string;
|
|
128
|
+
releases: string;
|
|
129
|
+
shared: string;
|
|
130
|
+
lock: string;
|
|
131
|
+
};
|
|
132
|
+
runtime: {
|
|
133
|
+
type: string;
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
export type DoctorReport = {
|
|
137
|
+
ok: boolean;
|
|
138
|
+
configPath: string;
|
|
139
|
+
application: string;
|
|
140
|
+
stage: string;
|
|
141
|
+
deployTo: string;
|
|
142
|
+
transport: {
|
|
143
|
+
type: string;
|
|
144
|
+
};
|
|
145
|
+
strategy: string;
|
|
146
|
+
runtime: {
|
|
147
|
+
type: string;
|
|
148
|
+
};
|
|
149
|
+
linkedFiles: number;
|
|
150
|
+
linkedDirs: number;
|
|
151
|
+
taskGroups: number;
|
|
152
|
+
healthChecks: number;
|
|
153
|
+
warnings: string[];
|
|
154
|
+
};
|
|
155
|
+
export type ReleaseInfo = {
|
|
156
|
+
application: string;
|
|
157
|
+
stage: string;
|
|
158
|
+
releaseId: string;
|
|
159
|
+
revision: string;
|
|
160
|
+
branch: string;
|
|
161
|
+
deployedAt: string;
|
|
162
|
+
deployedBy: string;
|
|
163
|
+
host: string;
|
|
164
|
+
rampwayVersion: string;
|
|
165
|
+
};
|
|
166
|
+
export type LockInfo = {
|
|
167
|
+
owner: string;
|
|
168
|
+
host: string;
|
|
169
|
+
pid: number;
|
|
170
|
+
createdAt: string;
|
|
171
|
+
};
|
|
172
|
+
export type CommandOptions = {
|
|
173
|
+
config?: string | undefined;
|
|
174
|
+
source?: string | undefined;
|
|
175
|
+
revision?: string | undefined;
|
|
176
|
+
branch?: string | undefined;
|
|
177
|
+
yes?: boolean | undefined;
|
|
178
|
+
dryRun?: boolean | undefined;
|
|
179
|
+
force?: boolean | undefined;
|
|
180
|
+
allowDirty?: boolean | undefined;
|
|
181
|
+
json?: boolean | undefined;
|
|
182
|
+
releaseId?: string | undefined;
|
|
183
|
+
to?: string | undefined;
|
|
184
|
+
releasePath?: string | undefined;
|
|
185
|
+
dir?: string | undefined;
|
|
186
|
+
};
|
|
187
|
+
export type CommandArgs = {
|
|
188
|
+
stageName: string;
|
|
189
|
+
options: CommandOptions;
|
|
190
|
+
commandContext?: Function | undefined;
|
|
191
|
+
};
|
|
192
|
+
export type Transport = {
|
|
193
|
+
mkdirp: (targetPath: string) => Promise<void>;
|
|
194
|
+
exists: (targetPath: string) => Promise<boolean>;
|
|
195
|
+
symlink: (target: string, linkPath: string, type?: string) => Promise<void>;
|
|
196
|
+
readlink: (linkPath: string) => Promise<string>;
|
|
197
|
+
rm: (targetPath: string) => Promise<void>;
|
|
198
|
+
rename: (from: string, to: string) => Promise<void>;
|
|
199
|
+
writeFile: (filePath: string, content: string) => Promise<void>;
|
|
200
|
+
readFile: (filePath: string) => Promise<string>;
|
|
201
|
+
list: (targetPath: string) => Promise<string[]>;
|
|
202
|
+
copyDir: (from: string, to: string) => Promise<void>;
|
|
203
|
+
run: (command: string, opts?: {
|
|
204
|
+
cwd?: string;
|
|
205
|
+
env?: Record<string, string>;
|
|
206
|
+
}) => Promise<{
|
|
207
|
+
code: number;
|
|
208
|
+
output: string;
|
|
209
|
+
}>;
|
|
210
|
+
stat?: ((targetPath: string) => Promise<{
|
|
211
|
+
isDirectory?: () => boolean;
|
|
212
|
+
} | undefined>) | undefined;
|
|
213
|
+
};
|
|
214
|
+
export type RuntimeAdapter = {
|
|
215
|
+
plan: () => string[];
|
|
216
|
+
deploy: (transport: Transport, opts: {
|
|
217
|
+
releasePath: string;
|
|
218
|
+
releaseId?: string;
|
|
219
|
+
revision?: string;
|
|
220
|
+
currentPath?: string;
|
|
221
|
+
}) => Promise<{
|
|
222
|
+
status: string;
|
|
223
|
+
}>;
|
|
224
|
+
status?: ((transport: Transport, opts: {
|
|
225
|
+
releasePath: string;
|
|
226
|
+
}) => Promise<{
|
|
227
|
+
output?: string;
|
|
228
|
+
}>) | undefined;
|
|
229
|
+
logs?: ((transport: Transport, opts: {
|
|
230
|
+
releasePath: string;
|
|
231
|
+
}) => Promise<{
|
|
232
|
+
output?: string;
|
|
233
|
+
}>) | undefined;
|
|
234
|
+
recover?: ((transport: Transport, opts: {
|
|
235
|
+
releasePath: string;
|
|
236
|
+
force?: boolean;
|
|
237
|
+
}) => Promise<{
|
|
238
|
+
output?: string;
|
|
239
|
+
}>) | undefined;
|
|
240
|
+
type?: string | undefined;
|
|
241
|
+
};
|
|
242
|
+
export type CommandPlan = {
|
|
243
|
+
command: string;
|
|
244
|
+
args: string[];
|
|
245
|
+
pipeTo?: CommandPlan | undefined;
|
|
246
|
+
};
|
|
247
|
+
export type DeployOptions = {
|
|
248
|
+
transport: Transport;
|
|
249
|
+
stage: StageConfig;
|
|
250
|
+
sourcePath?: string | undefined;
|
|
251
|
+
revision?: string | undefined;
|
|
252
|
+
branch?: string | undefined;
|
|
253
|
+
dryRun?: boolean | undefined;
|
|
254
|
+
releaseId?: string | undefined;
|
|
255
|
+
force?: boolean | undefined;
|
|
256
|
+
};
|
|
257
|
+
export type NodePackageInstallOptions = {
|
|
258
|
+
packageManager?: "npm" | "pnpm" | "yarn" | "bun" | undefined;
|
|
259
|
+
cwd?: string | undefined;
|
|
260
|
+
env?: Record<string, string> | undefined;
|
|
261
|
+
optional?: boolean | undefined;
|
|
262
|
+
production?: boolean | undefined;
|
|
263
|
+
clean?: boolean | undefined;
|
|
264
|
+
frozenLockfile?: boolean | undefined;
|
|
265
|
+
};
|
|
266
|
+
export type ConfigModule = {
|
|
267
|
+
config: object;
|
|
268
|
+
configPath: string;
|
|
269
|
+
};
|
|
270
|
+
export type RollbridgeRuntimeConfig = {
|
|
271
|
+
type: string;
|
|
272
|
+
command: string;
|
|
273
|
+
packageDir: string;
|
|
274
|
+
config?: string | undefined;
|
|
275
|
+
daemonLogPath?: string | undefined;
|
|
276
|
+
daemonPidPath?: string | undefined;
|
|
277
|
+
daemonStartTimeoutMs?: number | undefined;
|
|
278
|
+
socketPath?: string | undefined;
|
|
279
|
+
versionPath?: string | undefined;
|
|
280
|
+
};
|
|
281
|
+
export type SpawnResult = {
|
|
282
|
+
code: number;
|
|
283
|
+
output: string;
|
|
284
|
+
};
|
|
285
|
+
export type RegistryFactory = (config: RuntimeConfig) => RuntimeAdapter;
|
|
286
|
+
export type InitResult = {
|
|
287
|
+
created: boolean;
|
|
288
|
+
path: string;
|
|
289
|
+
};
|
|
290
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot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 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.js"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
# Config reference
|
|
2
|
+
|
|
3
|
+
`rampway.config.mjs` is an ESM module that exports a default config object.
|
|
4
|
+
|
|
5
|
+
## Top-level fields
|
|
6
|
+
|
|
7
|
+
| Field | Type | Required | Description |
|
|
8
|
+
|-------|------|----------|-------------|
|
|
9
|
+
| `application` | string | yes | Name of the application. Used in deploy metadata and reports. |
|
|
10
|
+
| `stages` | object | yes | Map of stage names to stage configs. |
|
|
11
|
+
|
|
12
|
+
## Stage fields
|
|
13
|
+
|
|
14
|
+
Each stage under `stages` supports:
|
|
15
|
+
|
|
16
|
+
| Field | Type | Required | Default | Description |
|
|
17
|
+
|-------|------|----------|---------|-------------|
|
|
18
|
+
| `deployTo` | string | yes | — | Absolute path to the deploy root directory (e.g. `/home/dev/myapp`). |
|
|
19
|
+
| `strategy` | string | no | Transport-dependent | Deploy strategy: `"local-copy"`, `"remote-git"`, or reserved `"archive-upload"`. Defaults to `"local-copy"` for local transport and `"remote-git"` for SSH transport. `archive-upload` is recognized but not yet deployable. |
|
|
20
|
+
| `transport` | object | no | `{type: "ssh"}` | Transport configuration. See Transport below. |
|
|
21
|
+
| `hosts` | array | no | `[]` | For SSH transport: list of hosts with `host`, `user`, and `roles`. |
|
|
22
|
+
| `keepReleases` | number | no | `5` | Number of old releases to keep after cleanup. |
|
|
23
|
+
| `linkedFiles` | array | no | `[]` | Files symlinked from `shared/` into each release. See Linked files below. |
|
|
24
|
+
| `linkedDirs` | array | no | `[]` | Directories symlinked from `shared/` into each release. |
|
|
25
|
+
| `tasks` | object | no | `{}` | Named task groups executed in order during deploy. See Tasks below. |
|
|
26
|
+
| `hooks` | object | no | `{}` | Lifecycle-phase hooks executed at specific points in the deploy pipeline. See Hooks below. |
|
|
27
|
+
| `runtime` | object | no | `{type: "none"}` | Runtime adapter config. See Runtime below. |
|
|
28
|
+
| `healthChecks` | array | no | `[]` | Checks run after tasks and before publish. See Health checks below. |
|
|
29
|
+
|
|
30
|
+
### Strategy: remote-git
|
|
31
|
+
|
|
32
|
+
The `remote-git` strategy creates a temporary checkout directory on the deployment target, removes its `.git` directory, then atomically renames it into the release directory before publish. A branch deployment performs a shallow `git clone --branch`; a pinned revision initializes the temporary directory, adds the configured repository as `origin`, and shallow-fetches that revision. The target host needs `git` and repository access. Required fields:
|
|
33
|
+
|
|
34
|
+
| Field | Type | Required | Description |
|
|
35
|
+
|-------|------|----------|-------------|
|
|
36
|
+
| `repo` | string | yes | Git repository URL (or local path). Used as the `origin` remote on the target. Avoid embedding credentials: plan and error output redact HTTPS URL user-info, but a credential helper or SSH deploy key is safer. |
|
|
37
|
+
| `branch` | string | no | Branch to fetch and check out. Default: `"master"`. |
|
|
38
|
+
| `revision` | string | no | Specific commit SHA to fetch and check out. When unset, the HEAD of `branch` is checked out. |
|
|
39
|
+
|
|
40
|
+
```js
|
|
41
|
+
strategy: "remote-git",
|
|
42
|
+
repo: "git@github.com:org/repo.git",
|
|
43
|
+
branch: "main"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Transport
|
|
47
|
+
|
|
48
|
+
### local
|
|
49
|
+
|
|
50
|
+
No-op transport for test deployments on the same machine.
|
|
51
|
+
|
|
52
|
+
```js
|
|
53
|
+
transport: {type: "local"}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### ssh
|
|
57
|
+
|
|
58
|
+
SSH transport using the local `ssh` client. Requires `hosts`.
|
|
59
|
+
|
|
60
|
+
```js
|
|
61
|
+
transport: {type: "ssh"},
|
|
62
|
+
hosts: [{host: "server.example", user: "dev", roles: ["app", "web"]}]
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Linked files and directories
|
|
66
|
+
|
|
67
|
+
Linked files and directories are symlinked from `shared/` into every release before tasks run.
|
|
68
|
+
|
|
69
|
+
### linkedFiles
|
|
70
|
+
|
|
71
|
+
Array of objects with `path` (required) and `required` (default `false`):
|
|
72
|
+
|
|
73
|
+
```js
|
|
74
|
+
linkedFiles: [
|
|
75
|
+
{path: ".env", required: true},
|
|
76
|
+
{path: "backend/src/config/secrets.js", required: false}
|
|
77
|
+
]
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Required files that don't exist in `shared/` cause the deploy to fail. Optional missing files are silently skipped.
|
|
81
|
+
|
|
82
|
+
### linkedDirs
|
|
83
|
+
|
|
84
|
+
Array of directory paths relative to the release root:
|
|
85
|
+
|
|
86
|
+
```js
|
|
87
|
+
linkedDirs: ["log", "tmp/pids", "tmp/cache", "storage"]
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Tasks
|
|
91
|
+
|
|
92
|
+
Task groups are named objects in `tasks`. Each value is a string or an array of task entries. Task groups run in config order.
|
|
93
|
+
|
|
94
|
+
### Task entries
|
|
95
|
+
|
|
96
|
+
A task entry can be:
|
|
97
|
+
|
|
98
|
+
- A **string**: the shell command to run.
|
|
99
|
+
- An **object**: with `command` (required), plus optional `cwd`, `env`, `optional`, and `onlyIfChanged`.
|
|
100
|
+
|
|
101
|
+
```js
|
|
102
|
+
tasks: {
|
|
103
|
+
install: [
|
|
104
|
+
"echo installing packages",
|
|
105
|
+
{command: "npm ci --omit=dev", cwd: "backend", env: {NODE_ENV: "production"}},
|
|
106
|
+
{command: "warm cache", optional: true}
|
|
107
|
+
],
|
|
108
|
+
migrate: ["NODE_ENV=production npm run db:migrate"]
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Task helpers
|
|
113
|
+
|
|
114
|
+
Import task helpers from `rampway/tasks`:
|
|
115
|
+
|
|
116
|
+
```js
|
|
117
|
+
import {npmInstall, pnpmInstall, yarnInstall, bunInstall} from "rampway/tasks"
|
|
118
|
+
import {checkExpoWebArtifacts, velociousMigrate, onlyIfChanged} from "rampway/tasks"
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
#### npmInstall / pnpmInstall / yarnInstall / bunInstall
|
|
122
|
+
|
|
123
|
+
Return a task entry with the install command for the given package manager.
|
|
124
|
+
|
|
125
|
+
Options: `cwd`, `env`, `optional`, `production`, `clean` (npm), `frozenLockfile` (pnpm/yarn/bun).
|
|
126
|
+
|
|
127
|
+
```js
|
|
128
|
+
npmInstall({cwd: "backend", production: true})
|
|
129
|
+
// → {command: "npm ci --omit=dev", cwd: "backend"}
|
|
130
|
+
|
|
131
|
+
pnpmInstall({cwd: "app", production: true})
|
|
132
|
+
// → {command: "pnpm install --frozen-lockfile --prod", cwd: "app"}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
#### velociousMigrate
|
|
136
|
+
|
|
137
|
+
Returns a task entry that runs `npx velocious db:migrate`.
|
|
138
|
+
|
|
139
|
+
Options: `command` (override), `cwd`, `env`, `optional`.
|
|
140
|
+
|
|
141
|
+
```js
|
|
142
|
+
velociousMigrate({cwd: "backend", env: {NODE_ENV: "production"}})
|
|
143
|
+
// → {command: "npx velocious db:migrate", cwd: "backend", env: {NODE_ENV: "production"}}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
#### checkExpoWebArtifacts
|
|
147
|
+
|
|
148
|
+
Returns a task entry that fails unless `index.html` exists in the Expo web build directory.
|
|
149
|
+
|
|
150
|
+
Options: `dir` (default `"dist"`), `cwd`, `optional`.
|
|
151
|
+
|
|
152
|
+
```js
|
|
153
|
+
checkExpoWebArtifacts({dir: "app/dist"})
|
|
154
|
+
// → {command: 'test -f "app/dist/index.html"'}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
#### onlyIfChanged
|
|
158
|
+
|
|
159
|
+
Wraps a task entry so it is skipped when none of the given paths have changed since the previous deploy. First deploys always run.
|
|
160
|
+
|
|
161
|
+
```js
|
|
162
|
+
onlyIfChanged(["backend"], npmInstall({cwd: "backend", production: true}))
|
|
163
|
+
// → {command: "npm ci --omit=dev", cwd: "backend", onlyIfChanged: ["backend"]}
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### Task execution model
|
|
167
|
+
|
|
168
|
+
1. Task groups run in config order.
|
|
169
|
+
2. Tasks within a group run in array order.
|
|
170
|
+
3. Required task failures stop the deploy before publish.
|
|
171
|
+
4. Optional task failures (`optional: true`) are recorded and the deploy continues.
|
|
172
|
+
5. Tasks with `onlyIfChanged` are skipped when their paths haven't changed since the last deploy.
|
|
173
|
+
6. Tasks with `cwd` resolve relative to the release root.
|
|
174
|
+
|
|
175
|
+
## Hooks
|
|
176
|
+
|
|
177
|
+
Hooks are lifecycle-phase callbacks that run commands at specific points during the deploy pipeline, outside the fixed task-group slot. Each hook phase accepts an array of task entries (strings or objects, same format as tasks).
|
|
178
|
+
|
|
179
|
+
Hooks before the release directory is created cannot use `cwd` (since there is no release path to resolve against). Hooks after `after_source` run with the release directory as their working directory and support `cwd`, `env`, `optional`, and `onlyIfChanged` like regular task entries.
|
|
180
|
+
|
|
181
|
+
| Phase | When it fires |
|
|
182
|
+
|-------|--------------|
|
|
183
|
+
| `before_deploy` | Before base directories are ensured |
|
|
184
|
+
| `before_lock` | Before deploy lock acquisition |
|
|
185
|
+
| `after_lock` | After deploy lock acquisition |
|
|
186
|
+
| `before_source` | Before source code copy |
|
|
187
|
+
| `after_source` | After source code is copied into the release directory |
|
|
188
|
+
| `before_tasks` | Before task groups execute |
|
|
189
|
+
| `after_tasks` | After task groups execute |
|
|
190
|
+
| `before_runtime` | Before runtime adapter deploy |
|
|
191
|
+
| `after_runtime` | After runtime adapter deploy |
|
|
192
|
+
| `before_health` | Before health checks |
|
|
193
|
+
| `after_health` | After health checks |
|
|
194
|
+
| `before_publish` | Before `current` symlink is updated |
|
|
195
|
+
| `after_publish` | After `current` symlink is updated |
|
|
196
|
+
| `before_cleanup` | Before old release cleanup |
|
|
197
|
+
| `after_cleanup` | After old release cleanup |
|
|
198
|
+
|
|
199
|
+
Hook failures follow task failure semantics: required-hook failures stop the deploy, and optional-hook failures (`optional: true`) are recorded and the deploy continues. Failures after publish include recovery hints in the error message since `current` may have changed.
|
|
200
|
+
|
|
201
|
+
```js
|
|
202
|
+
hooks: {
|
|
203
|
+
before_deploy: ["echo 'deploy starting'"],
|
|
204
|
+
after_publish: [{command: "notify-slack.sh", optional: true, env: {CHANNEL: "deploys"}}],
|
|
205
|
+
before_cleanup: [npmInstall({cwd: "backend"})]
|
|
206
|
+
}
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
Hooks and tasks can coexist. Tasks run at a fixed point (after shared links, before runtime). Hooks let you insert commands at any lifecycle phase without reordering task groups.
|
|
210
|
+
|
|
211
|
+
## Runtime
|
|
212
|
+
|
|
213
|
+
Configures how the deployed application is handed off to a process manager.
|
|
214
|
+
|
|
215
|
+
### none
|
|
216
|
+
|
|
217
|
+
No runtime — just deploy files.
|
|
218
|
+
|
|
219
|
+
```js
|
|
220
|
+
runtime: {type: "none"}
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### rollbridge
|
|
224
|
+
|
|
225
|
+
Rollbridge runtime adapter. Handles `deploy`, `validate`, `status`, `logs`, and `recover`.
|
|
226
|
+
|
|
227
|
+
| Field | Type | Required | Description |
|
|
228
|
+
|-------|------|----------|-------------|
|
|
229
|
+
| `type` | string | yes | `"rollbridge"` |
|
|
230
|
+
| `command` | string | no | Rollbridge CLI command. Default: `"npx rollbridge"`. |
|
|
231
|
+
| `packageDir` | string | yes | Release-relative directory containing the Rollbridge package. |
|
|
232
|
+
| `config` | string | no | Path to the Rollbridge config file. |
|
|
233
|
+
| `healthPath` | string | no | HTTP health check path. Default: `"/health"`. |
|
|
234
|
+
| `daemonLogPath` | string | no | Path to the daemon log file in shared storage. |
|
|
235
|
+
| `daemonPidPath` | string | no | Path to the daemon PID file in shared storage. |
|
|
236
|
+
| `socketPath` | string | no | Path to the Rollbridge Unix socket. |
|
|
237
|
+
| `versionPath` | string | no | Path to a version file used for stale-daemon detection. |
|
|
238
|
+
|
|
239
|
+
```js
|
|
240
|
+
runtime: {
|
|
241
|
+
type: "rollbridge",
|
|
242
|
+
packageDir: "backend",
|
|
243
|
+
config: "backend/config/rollbridge.production.mjs",
|
|
244
|
+
healthPath: "/health",
|
|
245
|
+
daemonLogPath: "/home/dev/myapp/shared/log/rollbridge.log",
|
|
246
|
+
daemonPidPath: "/home/dev/myapp/shared/tmp/pids/rollbridge.pid",
|
|
247
|
+
socketPath: "/tmp/rollbridge-myapp.sock",
|
|
248
|
+
versionPath: "/home/dev/myapp/shared/tmp/rollbridge-version"
|
|
249
|
+
}
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
## Health checks
|
|
253
|
+
|
|
254
|
+
Each health check is an object with one of:
|
|
255
|
+
|
|
256
|
+
- `path`: file to check exists, relative to the release root.
|
|
257
|
+
- `command`: shell command; exits 0 = healthy.
|
|
258
|
+
|
|
259
|
+
```js
|
|
260
|
+
healthChecks: [
|
|
261
|
+
{name: "package", path: "package.json"},
|
|
262
|
+
{name: "migrations-table", command: "node -e 'require(\"velocious\")'"}
|
|
263
|
+
]
|
|
264
|
+
```
|