Skip to content

Commit

Permalink
feat: fix pushpkg logic, only pushpkg when ciel exits with 0
Browse files Browse the repository at this point in the history
  • Loading branch information
jiegec committed Mar 20, 2024
1 parent 8c6de07 commit b298e83
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions worker/src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ async fn build(
let mut successful_packages = vec![];
let mut failed_package = None;
let mut skipped_packages = vec![];
let mut success = false;
let mut build_success = false;
let mut logs = vec![];

let mut output_path = args.ciel_path.clone();
Expand Down Expand Up @@ -153,7 +153,7 @@ async fn build(
ciel_args.extend(job.packages.split(','));
let output = get_output_logged("ciel", &ciel_args, &args.ciel_path, &mut logs).await?;

success = output.status.success();
build_success = output.status.success();

// parse output
// match acbs/acbs/util.py
Expand Down Expand Up @@ -202,7 +202,7 @@ async fn build(
}
}

if failed_package.is_none() {
if build_success {
if let Some(upload_ssh_key) = &args.upload_ssh_key {
pushpkg_success = run_logged_with_retry(
"pushpkg",
Expand Down Expand Up @@ -268,7 +268,7 @@ async fn build(
worker_secret: args.worker_secret.clone(),
job_id: job.job_id,
result: common::JobResult::Ok(JobOk {
build_success: success,
build_success: build_success,
successful_packages,
failed_package,
skipped_packages,
Expand Down

0 comments on commit b298e83

Please sign in to comment.