pub struct Job {Show 18 fields
pub cond: Option<Expression>,
pub name: Option<String>,
pub runs_on: Option<RunsOn>,
pub permissions: Option<Permissions>,
pub env: Option<Env>,
pub strategy: Option<Strategy>,
pub steps: Option<Vec<StepValue>>,
pub uses: Option<String>,
pub container: Option<Container>,
pub outputs: Option<IndexMap<String, String>>,
pub concurrency: Option<Concurrency>,
pub timeout_minutes: Option<u32>,
pub services: Option<IndexMap<String, Container>>,
pub secrets: Option<IndexMap<String, Secret>>,
pub defaults: Option<Defaults>,
pub continue_on_error: Option<bool>,
pub retry: Option<RetryStrategy>,
pub artifacts: Option<Artifacts>,
/* private fields */
}
Expand description
Represents a job in the workflow.
Fields§
§cond: Option<Expression>
§name: Option<String>
§runs_on: Option<RunsOn>
§permissions: Option<Permissions>
§env: Option<Env>
§strategy: Option<Strategy>
§steps: Option<Vec<StepValue>>
§uses: Option<String>
§container: Option<Container>
§outputs: Option<IndexMap<String, String>>
§concurrency: Option<Concurrency>
§timeout_minutes: Option<u32>
§services: Option<IndexMap<String, Container>>
§secrets: Option<IndexMap<String, Secret>>
§defaults: Option<Defaults>
§continue_on_error: Option<bool>
§retry: Option<RetryStrategy>
§artifacts: Option<Artifacts>
Implementations§
Source§impl Job
impl Job
pub fn tmp_needs(self, value: impl Into<Vec<Job>>) -> Job
Sourcepub fn permissions(self, value: impl Into<Permissions>) -> Job
pub fn permissions(self, value: impl Into<Permissions>) -> Job
Sets the permissions
field of this struct.
Sourcepub fn strategy(self, value: impl Into<Strategy>) -> Job
pub fn strategy(self, value: impl Into<Strategy>) -> Job
Sets the strategy
field of this struct.
Sourcepub fn steps(self, value: impl Into<Vec<StepValue>>) -> Job
pub fn steps(self, value: impl Into<Vec<StepValue>>) -> Job
Sets the steps
field of this struct.
Sourcepub fn container(self, value: impl Into<Container>) -> Job
pub fn container(self, value: impl Into<Container>) -> Job
Sets the container
field of this struct.
Sourcepub fn outputs(self, value: impl Into<IndexMap<String, String>>) -> Job
pub fn outputs(self, value: impl Into<IndexMap<String, String>>) -> Job
Sets the outputs
field of this struct.
Sourcepub fn concurrency(self, value: impl Into<Concurrency>) -> Job
pub fn concurrency(self, value: impl Into<Concurrency>) -> Job
Sets the concurrency
field of this struct.
Sourcepub fn timeout_minutes(self, value: impl Into<u32>) -> Job
pub fn timeout_minutes(self, value: impl Into<u32>) -> Job
Sets the timeout_minutes
field of this struct.
Sourcepub fn services(self, value: impl Into<IndexMap<String, Container>>) -> Job
pub fn services(self, value: impl Into<IndexMap<String, Container>>) -> Job
Sets the services
field of this struct.
Sourcepub fn secrets(self, value: impl Into<IndexMap<String, Secret>>) -> Job
pub fn secrets(self, value: impl Into<IndexMap<String, Secret>>) -> Job
Sets the secrets
field of this struct.
Sourcepub fn defaults(self, value: impl Into<Defaults>) -> Job
pub fn defaults(self, value: impl Into<Defaults>) -> Job
Sets the defaults
field of this struct.
Sourcepub fn continue_on_error(self, value: impl Into<bool>) -> Job
pub fn continue_on_error(self, value: impl Into<bool>) -> Job
Sets the continue_on_error
field of this struct.
Source§impl Job
impl Job
Sourcepub fn new<T>(name: T) -> Jobwhere
T: ToString,
pub fn new<T>(name: T) -> Jobwhere
T: ToString,
Creates a new Job
with the specified name and default settings.
Sourcepub fn add_step_when<S, T>(self, cond: bool, step: S) -> Job
pub fn add_step_when<S, T>(self, cond: bool, step: S) -> Job
Adds a step to the job when a condition is met.
Sourcepub fn add_env_when<T>(self, cond: bool, new_env: T) -> Job
pub fn add_env_when<T>(self, cond: bool, new_env: T) -> Job
Adds an environment variable to the job when a condition is met.
Sourcepub fn add_steps<T, I>(self, steps: I) -> Job
pub fn add_steps<T, I>(self, steps: I) -> Job
Add multiple steps to the job at once.
This is a convenience method that takes a vector of steps and adds them all to the job in order.
pub fn add_needs<J>(self, needs: J) -> Job
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Job
impl<'de> Deserialize<'de> for Job
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Job, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Job, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for Job
impl Serialize for Job
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for Job
impl StructuralPartialEq for Job
Auto Trait Implementations§
impl Freeze for Job
impl RefUnwindSafe for Job
impl Send for Job
impl Sync for Job
impl Unpin for Job
impl UnwindSafe for Job
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.