Skip to main content

AdoJob

Struct AdoJob 

Source
pub struct AdoJob {
    pub job: Option<String>,
    pub deployment: Option<String>,
    pub variables: Option<AdoVariables>,
    pub steps: Option<Vec<AdoStep>>,
    pub strategy: Option<AdoStrategy>,
    pub pool: Option<Value>,
    pub workspace: Option<Value>,
    pub template: Option<String>,
    pub environment: Option<Value>,
    pub condition: Option<String>,
    pub depends_on: Option<DependsOn>,
}

Fields§

§job: Option<String>

Regular job identifier

§deployment: Option<String>

Deployment job identifier

§variables: Option<AdoVariables>§steps: Option<Vec<AdoStep>>§strategy: Option<AdoStrategy>

Deployment-job nested strategy: runOnce/rolling/canary all share the shape strategy.{runOnce,rolling,canary}.deploy.steps. We only need the steps — the strategy choice itself doesn’t change authority flow.

§pool: Option<Value>§workspace: Option<Value>

Job-level workspace: block. The only security-relevant field is clean: which causes the agent to wipe the workspace between runs.

§template: Option<String>

Job-level template reference

§environment: Option<Value>

Deployment-job environment binding. Two YAML shapes:

  • environment: production (string shorthand)
  • environment: { name: staging, resourceType: VirtualMachine } (mapping)

When present, the environment may have approvals/checks attached in ADO’s environment configuration. Approvals are a manual gate — authority cannot propagate past one without human intervention. We treat any environment: binding as an approval candidate and tag the job’s steps so propagation rules can downgrade severity. (We can’t see the approval config from YAML alone; the binding is the strongest signal available at parse time.)

§condition: Option<String>

Job-level runtime gate. Evaluated at job-queue time; controls whether the job’s steps run. Cannot be statically evaluated — recorded as a Partial-Expression gap and stamped onto the job’s Step nodes via META_CONDITION (joined with any stage-level condition).

§depends_on: Option<DependsOn>

Job-level explicit dependsOn:. Default behaviour is “depends on the previous job” — only the explicit form is captured.

Implementations§

Source§

impl AdoJob

Source

pub fn effective_name(&self) -> String

Source

pub fn all_steps(&self) -> Vec<AdoStep>

Returns the effective step list for this job.

Regular jobs put steps under steps: directly. Deployment jobs nest them under strategy.{runOnce,rolling,canary}.{deploy,preDeploy, postDeploy,routeTraffic,onSuccess,onFailure}.steps. We merge all strategy-nested step lists into a single sequence so downstream rules see them as part of the job. Order: regular steps: first, then any strategy-nested steps in deterministic phase order.

Source

pub fn has_environment_binding(&self) -> bool

Returns true when the job is bound to an environment: — either the string form (environment: production) or the mapping form with a non-empty name: field. An empty mapping or empty string is ignored.

Trait Implementations§

Source§

impl Debug for AdoJob

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for AdoJob

Source§

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§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,