Radish alpha
r
rad:zwTxygwuz5LDGBq255RA2CbNGrz8
Radicle CI broker
Radicle
Git
feat: cibtool run add --job option
Lars Wirzenius committed 8 months ago
commit 9dee71a880d3c1c30b0d06810d292878edebace0
parent 8ed719a
1 file changed +9 -0
modified src/bin/cibtoolcmd/run.rs
@@ -1,6 +1,7 @@
use std::collections::HashSet;

use radicle_ci_broker::run::RunBuilder;
+
use radicle_job::JobId;

use super::*;

@@ -51,6 +52,10 @@ pub struct AddRun {
    /// Mark the CI run as finished and failed.
    #[clap(long, required_unless_present_any = ["triggered", "running", "success"])]
    failure: bool,
+

+
    /// Record job COB ID created for this run.
+
    #[clap(long)]
+
    job: Option<JobId>,
}

impl Leaf for AddRun {
@@ -82,6 +87,10 @@ impl Leaf for AddRun {
            run.set_adapter_info_url(url);
        }

+
        if let Some(job) = &self.job {
+
            run.set_job_id(*job);
+
        }
+

        if self.triggered {
            run.set_state(RunState::Triggered);
            run.unset_result();