Table of Contents

Class Job.RegularJob

Namespace
Invex.StructuredText.AzureDevopsPipelines.DevopsPipelineModel.Jobs
Assembly
Invex.StructuredText.AzureDevopsPipelines.dll

A job is a collection of steps run by an agent or on a server.

public sealed record Job.RegularJob : Job
Inheritance
object
Job.RegularJob

Constructors

RegularJob()

public RegularJob()

Properties

CancelTimeoutInMinutes

Time to wait for the job to cancel before forcibly terminating it.

public Template? CancelTimeoutInMinutes { get; init; }

Property Value

Template

Condition

Evaluate this condition expression to determine whether to run this job.

public BoolExpr? Condition { get; init; }

Property Value

BoolExpr

Container

Container resource name.

public JobContainer? Container { get; init; }

Property Value

JobContainer

ContinueOnError

Continue running even on failure?

public Template? ContinueOnError { get; init; }

Property Value

Template

DependsOn

Any jobs which must complete before this one.

public IReadOnlyList<Template>? DependsOn { get; init; }

Property Value

IReadOnlyList<Template>

DisplayName

Human-readable name for the job.

public Template? DisplayName { get; init; }

Property Value

Template

JobId

ID of the job. Valid names may only contain alphanumeric characters and '_' and may not start with a number.

public required Template JobId { get; init; }

Property Value

Template

Pool

Pool where this job will run.

public Pool? Pool { get; init; }

Property Value

Pool

Services

Container resources to run as a service container.

public IReadOnlyDictionary<string, Template>? Services { get; init; }

Property Value

IReadOnlyDictionary<string, Template>

Steps

A list of steps to run.

public IReadOnlyList<Step>? Steps { get; init; }

Property Value

IReadOnlyList<Step>

Strategy

Execution strategy for this job.

public JobStrategy? Strategy { get; init; }

Property Value

JobStrategy

TemplateContext

Job related information passed from a pipeline when extending a template.

public IReadOnlyDictionary<string, Template>? TemplateContext { get; init; }

Property Value

IReadOnlyDictionary<string, Template>

TimeoutInMinutes

Time to wait for this job to complete before the server kills it.

public Template? TimeoutInMinutes { get; init; }

Property Value

Template

Uses

Any resources required by this job that are not already referenced.

public ExplicitResources? Uses { get; init; }

Property Value

ExplicitResources

Variables

Job-specific variables.

public Variables? Variables { get; init; }

Property Value

Variables

Workspace

Workspace options on the agent.

public Workspace? Workspace { get; init; }

Property Value

Workspace

Methods

Match(Action<RegularJob>, Action<Deployment>, Action<Template>)

public override void Match(Action<Job.RegularJob> regularJob, Action<Job.Deployment> deployment, Action<Job.Template> template)

Parameters

regularJob Action<Job.RegularJob>
deployment Action<Job.Deployment>
template Action<Job.Template>

MatchDeployment(Action<Deployment>, Action)

public override void MatchDeployment(Action<Job.Deployment> deployment, Action @else)

Parameters

deployment Action<Job.Deployment>
else Action

MatchDeployment<TMatchOutput>(Func<Deployment, TMatchOutput>, Func<TMatchOutput>)

public override TMatchOutput MatchDeployment<TMatchOutput>(Func<Job.Deployment, TMatchOutput> deployment, Func<TMatchOutput> @else)

Parameters

deployment Func<Job.Deployment, TMatchOutput>
else Func<TMatchOutput>

Returns

TMatchOutput

Type Parameters

TMatchOutput

MatchDeployment<TState>(TState, Action<TState, Deployment>, Action<TState>)

public override void MatchDeployment<TState>(TState state, Action<TState, Job.Deployment> deployment, Action<TState> @else)

Parameters

state TState
deployment Action<TState, Job.Deployment>
else Action<TState>

Type Parameters

TState

MatchDeployment<TState, TMatchOutput>(TState, Func<TState, Deployment, TMatchOutput>, Func<TState, TMatchOutput>)

public override TMatchOutput MatchDeployment<TState, TMatchOutput>(TState state, Func<TState, Job.Deployment, TMatchOutput> deployment, Func<TState, TMatchOutput> @else)

Parameters

state TState
deployment Func<TState, Job.Deployment, TMatchOutput>
else Func<TState, TMatchOutput>

Returns

TMatchOutput

Type Parameters

TState
TMatchOutput

MatchRegularJob(Action<RegularJob>, Action)

public override void MatchRegularJob(Action<Job.RegularJob> regularJob, Action @else)

Parameters

regularJob Action<Job.RegularJob>
else Action

MatchRegularJob<TMatchOutput>(Func<RegularJob, TMatchOutput>, Func<TMatchOutput>)

public override TMatchOutput MatchRegularJob<TMatchOutput>(Func<Job.RegularJob, TMatchOutput> regularJob, Func<TMatchOutput> @else)

Parameters

regularJob Func<Job.RegularJob, TMatchOutput>
else Func<TMatchOutput>

Returns

TMatchOutput

Type Parameters

TMatchOutput

MatchRegularJob<TState>(TState, Action<TState, RegularJob>, Action<TState>)

public override void MatchRegularJob<TState>(TState state, Action<TState, Job.RegularJob> regularJob, Action<TState> @else)

Parameters

state TState
regularJob Action<TState, Job.RegularJob>
else Action<TState>

Type Parameters

TState

MatchRegularJob<TState, TMatchOutput>(TState, Func<TState, RegularJob, TMatchOutput>, Func<TState, TMatchOutput>)

public override TMatchOutput MatchRegularJob<TState, TMatchOutput>(TState state, Func<TState, Job.RegularJob, TMatchOutput> regularJob, Func<TState, TMatchOutput> @else)

Parameters

state TState
regularJob Func<TState, Job.RegularJob, TMatchOutput>
else Func<TState, TMatchOutput>

Returns

TMatchOutput

Type Parameters

TState
TMatchOutput

MatchTemplate(Action<Template>, Action)

public override void MatchTemplate(Action<Job.Template> template, Action @else)

Parameters

template Action<Job.Template>
else Action

MatchTemplate<TMatchOutput>(Func<Template, TMatchOutput>, Func<TMatchOutput>)

public override TMatchOutput MatchTemplate<TMatchOutput>(Func<Job.Template, TMatchOutput> template, Func<TMatchOutput> @else)

Parameters

template Func<Job.Template, TMatchOutput>
else Func<TMatchOutput>

Returns

TMatchOutput

Type Parameters

TMatchOutput

MatchTemplate<TState>(TState, Action<TState, Template>, Action<TState>)

public override void MatchTemplate<TState>(TState state, Action<TState, Job.Template> template, Action<TState> @else)

Parameters

state TState
template Action<TState, Job.Template>
else Action<TState>

Type Parameters

TState

MatchTemplate<TState, TMatchOutput>(TState, Func<TState, Template, TMatchOutput>, Func<TState, TMatchOutput>)

public override TMatchOutput MatchTemplate<TState, TMatchOutput>(TState state, Func<TState, Job.Template, TMatchOutput> template, Func<TState, TMatchOutput> @else)

Parameters

state TState
template Func<TState, Job.Template, TMatchOutput>
else Func<TState, TMatchOutput>

Returns

TMatchOutput

Type Parameters

TState
TMatchOutput

Match<TMatchOutput>(Func<RegularJob, TMatchOutput>, Func<Deployment, TMatchOutput>, Func<Template, TMatchOutput>)

public override TMatchOutput Match<TMatchOutput>(Func<Job.RegularJob, TMatchOutput> regularJob, Func<Job.Deployment, TMatchOutput> deployment, Func<Job.Template, TMatchOutput> template)

Parameters

regularJob Func<Job.RegularJob, TMatchOutput>
deployment Func<Job.Deployment, TMatchOutput>
template Func<Job.Template, TMatchOutput>

Returns

TMatchOutput

Type Parameters

TMatchOutput

Match<TState>(TState, Action<TState, RegularJob>, Action<TState, Deployment>, Action<TState, Template>)

public override void Match<TState>(TState state, Action<TState, Job.RegularJob> regularJob, Action<TState, Job.Deployment> deployment, Action<TState, Job.Template> template)

Parameters

state TState
regularJob Action<TState, Job.RegularJob>
deployment Action<TState, Job.Deployment>
template Action<TState, Job.Template>

Type Parameters

TState

Match<TState, TMatchOutput>(TState, Func<TState, RegularJob, TMatchOutput>, Func<TState, Deployment, TMatchOutput>, Func<TState, Template, TMatchOutput>)

public override TMatchOutput Match<TState, TMatchOutput>(TState state, Func<TState, Job.RegularJob, TMatchOutput> regularJob, Func<TState, Job.Deployment, TMatchOutput> deployment, Func<TState, Job.Template, TMatchOutput> template)

Parameters

state TState
regularJob Func<TState, Job.RegularJob, TMatchOutput>
deployment Func<TState, Job.Deployment, TMatchOutput>
template Func<TState, Job.Template, TMatchOutput>

Returns

TMatchOutput

Type Parameters

TState
TMatchOutput

UnwrapDeployment()

public override Job.Deployment UnwrapDeployment()

Returns

Job.Deployment

UnwrapRegularJob()

public override Job.RegularJob UnwrapRegularJob()

Returns

Job.RegularJob

UnwrapTemplate()

public override Job.Template UnwrapTemplate()

Returns

Job.Template