summaryrefslogtreecommitdiffstats
path: root/src/pipeline
diff options
context:
space:
mode:
Diffstat (limited to 'src/pipeline')
-rw-r--r--src/pipeline/mod.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pipeline/mod.rs b/src/pipeline/mod.rs
index 279ec0f..01c9bc5 100644
--- a/src/pipeline/mod.rs
+++ b/src/pipeline/mod.rs
@@ -199,7 +199,7 @@ pub fn run_with(ctx: &Ctx) -> Result<Outcome> {
std::fs::create_dir_all(&ctx.staging)?;
for step in crate::db::model::BUILD_STEPS {
if crate::db::builds::cancel_requested(&ctx.db, &ctx.build.id)? {
- builds::set_state(&ctx.db, &ctx.build.id, build_state::CANCELLED, Some("cancelled"))?;
+ builds::set_state(&ctx.db, &ctx.build.id, BuildState::Cancelled, Some("cancelled"))?;
return Ok(Outcome::Cancelled);
}
let status = builds::step_status(&ctx.db, &ctx.build.id, step)?;
@@ -207,7 +207,7 @@ pub fn run_with(ctx: &Ctx) -> Result<Outcome> {
continue; // checkpoint says we already did this
}
builds::begin_step(&ctx.db, &ctx.build.id, step, ctx.attempt)?;
- builds::set_state(&ctx.db, &ctx.build.id, build_state::RUNNING, None)?;
+ builds::set_state(&ctx.db, &ctx.build.id, BuildState::Running, None)?;
ctx.log_line(&format!("==> step {step} (attempt {})", ctx.attempt));
match steps::run_step(ctx, step) {
Ok(StepResult::Done(digest)) => {
@@ -230,7 +230,7 @@ pub fn run_with(ctx: &Ctx) -> Result<Outcome> {
builds::set_state(
&ctx.db,
&ctx.build.id,
- build_state::FAILED,
+ BuildState::Failed,
Some(&format!("{step}: {e}")),
)?;
ctx.log_line(&format!("!! {step} failed: {e}"));
@@ -248,7 +248,7 @@ pub fn run_with(ctx: &Ctx) -> Result<Outcome> {
let release_id = ctx
.release_id()
.ok_or_else(|| Error::other("publish produced no release"))?;
- builds::set_state(&ctx.db, &ctx.build.id, build_state::SUCCEEDED, None)?;
+ builds::set_state(&ctx.db, &ctx.build.id, BuildState::Succeeded, None)?;
db::audit_system(
&ctx.db.writer,
"build.succeeded",