pub struct JobDef {
pub name: Option<String>,
pub needs: Needs,
pub run: Option<String>,
pub steps: Vec<StepDef>,
pub env: IndexMap<String, String>,
pub timeout: Option<u64>,
pub condition: Option<String>,
pub labels: Vec<String>,
pub retries: u32,
}Expand description
A single job definition in the workflow YAML.
Fields§
§name: Option<String>Display name (defaults to the job key if not set).
needs: NeedsJob dependencies — other job IDs that must succeed first.
run: Option<String>Shell command to run (simple single-command job).
steps: Vec<StepDef>Multi-step job (used instead of run).
env: IndexMap<String, String>Per-job environment variables.
timeout: Option<u64>Timeout in seconds.
condition: Option<String>Condition for running this job (expression string).
labels: Vec<String>Worker labels required to execute this job.
retries: u32Maximum number of retries on failure (default 0).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for JobDef
impl<'de> Deserialize<'de> for JobDef
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for JobDef
impl RefUnwindSafe for JobDef
impl Send for JobDef
impl Sync for JobDef
impl Unpin for JobDef
impl UnsafeUnpin for JobDef
impl UnwindSafe for JobDef
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more