summaryrefslogtreecommitdiff
path: root/worker/jobs/ci_pipeline.run
diff options
context:
space:
mode:
Diffstat (limited to 'worker/jobs/ci_pipeline.run')
-rw-r--r--worker/jobs/ci_pipeline.run8
1 files changed, 5 insertions, 3 deletions
diff --git a/worker/jobs/ci_pipeline.run b/worker/jobs/ci_pipeline.run
index 337bd53..434850c 100644
--- a/worker/jobs/ci_pipeline.run
+++ b/worker/jobs/ci_pipeline.run
@@ -1,3 +1,5 @@
+#!/usr/bin/env -S deno run --allow-all
+
import {
type Command,
Either,
@@ -13,8 +15,8 @@ import {
type CheckoutCiJob,
type FetchCodeJob,
PipelineImpl,
-} from "@emprespresso/ci-model";
-import { executeJob, executePipeline } from "@emprespresso/ci-worker";
+} from "@emprespresso/ci_model";
+import { executeJob, executePipeline } from "@emprespresso/ci_worker";
const run = Date.now().toString();
const eitherJob = getRequiredEnvVars(["remote", "refname", "rev"])
@@ -122,7 +124,7 @@ await LogMetricTraceable.from(eitherJob).bimap(TraceUtil.withTrace(trace))
.get()
.then((e) =>
e.flatMap(() => eitherJob).fold((err, val) => {
- if (err) throw err;
+ if (!val || err) throw err;
return Deno.remove(getWorkingDirectoryForCiJob(val), { recursive: true });
})
);