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
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.