Skip to content

Latest commit

 

History

History
136 lines (93 loc) · 3.16 KB

New-AdoJob.md

File metadata and controls

136 lines (93 loc) · 3.16 KB
external help file Module Name online version schema
Pipelines.dll-Help.xml
Pipelines
2.0.0

New-AdoJob

SYNOPSIS

This Cmdlet creates an Ado Job object

SYNTAX

New-AdoJob [-Name] <String> [[-Pool] <Pool>] [[-Variables] <Hashtable>] [[-Steps] <Template[]>]
 [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

You can organize your pipeline into jobs. Every pipeline has at least one job. A job is a series of steps that run sequentially as a unit. In other words, a job is the smallest unit of work that can be scheduled to run.

Azure Pipelines does not support job priority for YAML pipelines. To control when jobs run, you can specify conditions and dependencies.

EXAMPLES

Example 1

PS C:\> New-AdoJob -Name MyJob -Pool $Pool -Variables @{'Environment'="$[ stageDependencies.DetermineEnvironment.GetVariables.outputs['SetVariables.Environment'] ]"}

Name      : MyJob
Pool      : name: $(poolName)
            demands: Agent.Name -equals $(AgentName)
Variables : {[Environment, $[ stageDependencies.DetermineEnvironment.GetVariables.outputs['SetVariables.Environment'] ]]}
Steps     : {}

This creates a Job object on the Command line.

PARAMETERS

-Name

Required as first property. ID of the job.

Type: System.String
Parameter Sets: (All)
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Pool

Pool where this job will run.

Type: ModPosh.Pipelines.Ado.Pool
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Steps

A list of steps to run.

Type: ModPosh.Pipelines.Ado.Template[]
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Variables

Job-specific variables.

Type: System.Collections.Hashtable
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

None

OUTPUTS

ModPosh.Pipelines.Ado.Job

NOTES

RELATED LINKS

Jobs in pipeline

Jobs

Job

Steps

Variables