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 template: Option<String>,
pub environment: Option<Value>,
}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>§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.)
Implementations§
Source§impl AdoJob
impl AdoJob
pub fn effective_name(&self) -> String
Sourcepub fn all_steps(&self) -> Vec<AdoStep>
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.
Sourcepub fn has_environment_binding(&self) -> bool
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.