feat: Cancel builds!

This commit is contained in:
Andras Bacsai
2022-05-02 14:15:50 +02:00
parent b92bc9eebb
commit 00cab67e73
23 changed files with 207 additions and 65 deletions

View File

@@ -45,15 +45,23 @@ export const post: RequestHandler = async (event) => {
}
});
if (pullmergeRequestId) {
await buildQueue.add(buildId, {
build_id: buildId,
type: 'manual',
...applicationFound,
sourceBranch: branch,
pullmergeRequestId
});
await buildQueue.add(
buildId,
{
build_id: buildId,
type: 'manual',
...applicationFound,
sourceBranch: branch,
pullmergeRequestId
},
{ jobId: buildId }
);
} else {
await buildQueue.add(buildId, { build_id: buildId, type: 'manual', ...applicationFound });
await buildQueue.add(
buildId,
{ build_id: buildId, type: 'manual', ...applicationFound },
{ jobId: buildId }
);
}
return {
status: 200,