Jobs are the building blocks of an Azure DevOps pipeline that represent units of work assignable to a single agent. Jobs run in sequence or parallel within a stage and contain a series of steps that run sequentially on the same agent.
Job Schema
jobs: [ job | deployment | template ] # Required. Jobs represent units of work which can be assigned to a single agent or server.
pool: string | pool # Pool where jobs in this pipeline will run unless otherwise specified.
name: string # Pipeline run number.
appendCommitMessageToRunName: boolean # Append the commit message to the build number. The default is true.
trigger: none | trigger | [ string ] # Continuous integration triggers.
parameters: [ parameter ] # Pipeline template parameters.
pr: none | pr | [ string ] # Pull request triggers.
schedules: [ cron ] # Scheduled triggers.
resources: # Containers and repositories used in the build.
builds: [ build ] # List of build resources referenced by the pipeline.
containers: [ container ] # List of container images.
pipelines: [ pipeline ] # List of pipeline resources.
repositories: [ repository ] # List of repository resources.
webhooks: [ webhook ] # List of webhooks.
packages: [ package ] # List of package resources.
variables: variables | [ variable ] # Variables for this pipeline.
lockBehavior: string # Behavior lock requests from this stage should exhibit in relation to other exclusive lock requests.
Individual Job Schema
job: string # Required. ID of the job.
displayName: string # Human-readable name for the job.
dependsOn: string | [ string ] # Any jobs which must complete before this one starts.
condition: string # Condition for job to execute.
continueOnError: boolean # Continue running even if the job fails.
timeoutInMinutes: number # Max time to wait for job to complete.
cancelTimeoutInMinutes: number # Max time to wait for job to cancel.
variables: variables | [ variable ] # Variables specific to this job.
pool: pool # Agent pool to use for this job.
workspace: # Workspace options on the agent.
clean: string # Which parts of workspace should be cleaned before fetching repo.
container: string | container # Container resource name or container specification.
services: # Container resources to run as service containers.
string: string # Name/value pairs.
uses: # External repository from which to get steps.
repositories: [ repository ] # List of repositories.
parameters: { string: any } # Parameters passed to template.
steps: [ task | script | powershell | pwsh | bash | checkout | download | downloadBuild | getPackage | publish | template | reviewApp ] # List of steps to run in this job.
strategy: # Execution strategy for this job.
parallel: number # Max number of simultaneous matrix legs to run.
matrix: { string: { string: string } } # Matrix of parameter values for each job.
maxParallel: number # Maximum number of matrix legs to run simultaneously.
failFast: boolean # Whether to cancel all running jobs if any job fails.