fix: ENV variables set differently

This commit is contained in:
Andras Bacsai
2022-02-10 21:43:54 +01:00
parent ae6f325c0a
commit 82de234f21
3 changed files with 24 additions and 12 deletions

View File

@@ -120,7 +120,9 @@ buildWorker.on('completed', async (job: Bullmq.Job) => {
} catch (err) {
console.log(err);
} finally {
await asyncExecShell(`rm -fr ${job.data.workdir}`);
const workdir = `/tmp/build-sources/${job.data.repository}/${job.data.build_id}`;
await asyncExecShell(`rm -fr ${workdir}`);
await asyncExecShell(`rm /tmp/build-sources/${job.data.repository}/id.rsa`);
}
return;
});
@@ -132,7 +134,9 @@ buildWorker.on('failed', async (job: Bullmq.Job, failedReason) => {
} catch (error) {
console.log(error);
} finally {
await asyncExecShell(`rm -fr ${job.data.workdir}`);
const workdir = `/tmp/build-sources/${job.data.repository}/${job.data.build_id}`;
await asyncExecShell(`rm -fr ${workdir}`);
await asyncExecShell(`rm /tmp/build-sources/${job.data.repository}/id.rsa`);
}
saveBuildLog({ line: 'Failed build!', buildId: job.data.build_id, applicationId: job.data.id });
saveBuildLog({