feat: Add Git workspace management for build profiles and implement workspace cleanup
This commit is contained in:
1 parent
b46249dcbc
commit
e64962c3fd
10 files changed
+344
-7
No files matched your search
@@ -98,6 +98,7 @@ export const adminRouter = router({
|
||||
.input(
|
||||
z.object({
|
||||
profileName: z.string().min(1),
|
||||
commitSha: z.string().min(7).max(64),
|
||||
})
|
||||
)
|
||||
.mutation(async ({ ctx, input }) => {
|
||||
@@ -108,6 +109,7 @@ export const adminRouter = router({
|
||||
{
|
||||
requestedAt,
|
||||
error: null,
|
||||
commitSha: input.commitSha,
|
||||
}
|
||||
);
|
||||
return result;
|
||||
@@ -126,5 +128,12 @@ export const adminRouter = router({
|
||||
await ctx.orchestrator.reconcileNow();
|
||||
return { ok: true };
|
||||
}),
|
||||
cleanupWorkspaces: adminProcedure.mutation(async ({ ctx }) => {
|
||||
const result = await ctx.orchestrator.cleanupStaleWorkspaces();
|
||||
return {
|
||||
removed: result.removed,
|
||||
skipped: result.skipped,
|
||||
};
|
||||
}),
|
||||
}),
|
||||
});
|
||||
Reference in new issue
Block a user