fix: Correct branch shown in build logs

This commit is contained in:
Andras Bacsai 2022-04-20 23:02:19 +02:00
parent e16643c48c
commit 8ebff72cde
5 changed files with 5 additions and 2 deletions

View File

@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "Build" ADD COLUMN "branch" TEXT;

View File

@ -183,6 +183,7 @@ model Build {
githubAppId String? githubAppId String?
gitlabAppId String? gitlabAppId String?
commit String? commit String?
branch String?
status String? @default("queued") status String? @default("queued")
createdAt DateTime @default(now()) createdAt DateTime @default(now())
updatedAt DateTime @updatedAt updatedAt DateTime @updatedAt

View File

@ -34,7 +34,6 @@ const createDockerfile = async (data, image): Promise<void> => {
Dockerfile.push(`COPY .${baseDirectory || ''}/deps.ts /app`); Dockerfile.push(`COPY .${baseDirectory || ''}/deps.ts /app`);
Dockerfile.push(`RUN deno cache deps.ts`); Dockerfile.push(`RUN deno cache deps.ts`);
} }
console.log(denoOptions && denoOptions.split());
Dockerfile.push(`COPY ${denoMainFile} /app`); Dockerfile.push(`COPY ${denoMainFile} /app`);
Dockerfile.push(`RUN deno cache ${denoMainFile}`); Dockerfile.push(`RUN deno cache ${denoMainFile}`);
Dockerfile.push(`COPY .${baseDirectory || ''} ./`); Dockerfile.push(`COPY .${baseDirectory || ''} ./`);

View File

@ -35,6 +35,7 @@ export const post: RequestHandler = async (event) => {
data: { data: {
id: buildId, id: buildId,
applicationId: id, applicationId: id,
branch: applicationFound.branch,
destinationDockerId: applicationFound.destinationDocker.id, destinationDockerId: applicationFound.destinationDocker.id,
gitSourceId: applicationFound.gitSource.id, gitSourceId: applicationFound.gitSource.id,
githubAppId: applicationFound.gitSource.githubApp?.id, githubAppId: applicationFound.gitSource.githubApp?.id,

View File

@ -173,7 +173,7 @@
> >
<div class="flex-col px-2"> <div class="flex-col px-2">
<div class="text-sm font-bold"> <div class="text-sm font-bold">
{application.branch} {build.branch || application.branch}
</div> </div>
<div class="text-xs"> <div class="text-xs">
{build.type} {build.type}