jobs.job definition

A feladat egy ügynök vagy egy kiszolgálón futtatott lépések gyűjteménye.

jobs:
- job: string # Required as first property. ID of the job.
  displayName: string # Human-readable name for the job.
  dependsOn: string | [ string ] # Any jobs which must complete before this one.
  condition: string # Evaluate this condition expression to determine whether to run this job.
  continueOnError: string # Continue running even on failure?
  timeoutInMinutes: string # Time to wait for this job to complete before the server kills it.
  cancelTimeoutInMinutes: string # Time to wait for the job to cancel before forcibly terminating it.
  variables: variables | [ variable ] # Job-specific variables.
  strategy: strategy # Execution strategy for this job.
  pool: string | pool # Pool where this job will run.
  container: string | container # Container resource name.
  services: # Container resources to run as a service container.
    string: string # Name/value pairs
  workspace: # Workspace options on the agent.
    clean: string # Which parts of the workspace should be scorched before fetching.
  uses: # Any resources required by this job that are not already referenced.
    repositories: [ string ] # Repository references.
    pools: [ string ] # Pool references.
  steps: [ task | script | powershell | pwsh | bash | checkout | download | downloadBuild | getPackage | publish | template | reviewApp ] # A list of steps to run.
  templateContext: # Job related information passed from a pipeline when extending a template.
jobs:
- job: string # Required as first property. ID of the job.
  displayName: string # Human-readable name for the job.
  dependsOn: string | [ string ] # Any jobs which must complete before this one.
  condition: string # Evaluate this condition expression to determine whether to run this job.
  continueOnError: string # Continue running even on failure?
  timeoutInMinutes: string # Time to wait for this job to complete before the server kills it.
  cancelTimeoutInMinutes: string # Time to wait for the job to cancel before forcibly terminating it.
  variables: variables | [ variable ] # Job-specific variables.
  strategy: strategy # Execution strategy for this job.
  pool: string | pool # Pool where this job will run.
  container: string | container # Container resource name.
  services: # Container resources to run as a service container.
    string: string # Name/value pairs
  workspace: # Workspace options on the agent.
    clean: string # Which parts of the workspace should be scorched before fetching.
  uses: # Any resources required by this job that are not already referenced.
    repositories: [ string ] # Repository references.
    pools: [ string ] # Pool references.
  steps: [ task | script | powershell | pwsh | bash | checkout | download | downloadBuild | getPackage | publish | template | reviewApp ] # A list of steps to run.
jobs:
- job: string # Required as first property. ID of the job.
  displayName: string # Human-readable name for the job.
  dependsOn: string | [ string ] # Any jobs which must complete before this one.
  condition: string # Evaluate this condition expression to determine whether to run this job.
  continueOnError: string # Continue running even on failure?
  timeoutInMinutes: string # Time to wait for this job to complete before the server kills it.
  cancelTimeoutInMinutes: string # Time to wait for the job to cancel before forcibly terminating it.
  variables: variables | [ variable ] # Job-specific variables.
  strategy: strategy # Execution strategy for this job.
  pool: string | pool # Pool where this job will run.
  container: string | container # Container resource name.
  services: # Container resources to run as a service container.
    string: string # Name/value pairs
  workspace: # Workspace options on the agent.
    clean: string # Which parts of the workspace should be scorched before fetching.
  steps: [ task | script | powershell | pwsh | bash | checkout | download | downloadBuild | getPackage | publish | template | reviewApp ] # A list of steps to run.
jobs:
- job: string # Required as first property. ID of the job.
  displayName: string # Human-readable name for the job.
  dependsOn: string | [ string ] # Any jobs which must complete before this one.
  condition: string # Evaluate this condition expression to determine whether to run this job.
  continueOnError: string # Continue running even on failure?
  timeoutInMinutes: string # Time to wait for this job to complete before the server kills it.
  cancelTimeoutInMinutes: string # Time to wait for the job to cancel before forcibly terminating it.
  variables: variables | [ variable ] # Job-specific variables.
  strategy: strategy # Execution strategy for this job.
  pool: string | pool # Pool where this job will run.
  container: string | container # Container resource name.
  services: # Container resources to run as a service container.
    string: string # Name/value pairs
  workspace: # Workspace options on the agent.
    clean: string # Scorch the repo before fetching?
  steps: [ task | script | powershell | pwsh | bash | checkout | download | downloadBuild | publish | template ] # A list of steps to run.
jobs:
- job: string # Required as first property. ID of the job.
  displayName: string # Human-readable name for the job.
  dependsOn: string | [ string ] # Any jobs which must complete before this one.
  condition: string # Evaluate this condition expression to determine whether to run this job.
  continueOnError: string # Continue running even on failure?
  timeoutInMinutes: string # Time to wait for this job to complete before the server kills it.
  cancelTimeoutInMinutes: string # Time to wait for the job to cancel before forcibly terminating it.
  variables: variables | [ variable ] # Job-specific variables.
  strategy: strategy # Execution strategy for this job.
  pool: string | pool # Pool where this job will run.
  services: # Container resources to run as a service container.
    string: string # Name/value pairs
  workspace: # Workspace options on the agent.
    clean: string # Scorch the repo before fetching?
  steps: [ task | script | powershell | pwsh | bash | checkout | download | downloadBuild | publish | template ] # A list of steps to run.

A definícióra hivatkozó definíciók: feladatok

Tulajdonságok

job Karakterlánc. Első tulajdonságként kötelező megadni.
A feladat azonosítója. Elfogadható értékek: Az érvényes nevek csak alfanumerikus karaktereket és _karaktereket tartalmazhatnak, és nem kezdődhetnek számmal.

displayName Karakterlánc.
A feladat emberi olvasásra alkalmas neve.

dependsOn sztring | sztringlista.
Minden olyan feladat, amelynek előbb be kell fejeződnie.

condition Karakterlánc.
Értékelje ki ezt a feltételkifejezést a feladat futtatásának meghatározásához.

continueOnError Karakterlánc.
Továbbra is fut a hiba esetén is?

timeoutInMinutes Karakterlánc.
Ideje megvárni, amíg a feladat befejeződik, mielőtt a kiszolgáló leáll.

cancelTimeoutInMinutes Karakterlánc.
Ideje megvárni, amíg a feladat megszakítja a műveletet, mielőtt kényszerítetten leállna.

variablesváltozók.
Feladatspecifikus változók.

strategyjobs.job.strategy.
Végrehajtási stratégia ehhez a feladathoz.

poolkészletben.
Készlet, ahol a feladat futni fog.

containerjobs.job.container.
Tárolóerőforrás neve.

services sztringszótár.
Szolgáltatástárolóként futtatandó tárolóerőforrások.

workspacemunkaterületen.
Munkaterület beállításai az ügynökön. A munkaterületekkel kapcsolatos további információkért, beleértve a tiszta beállításokat is, tekintse meg a Munkaterületek témakört a Feladatok területen.

usesjobs.job.uses.
A feladathoz szükséges erőforrások, amelyekre még nincs hivatkozva. További információ: usesFeladat-engedélyezési hatókör korlátozása az Azure DevOps-adattárakra való hivatkozáshoz.

stepslépéseket.
A futtatandó lépések listája.

templateContext templateContext.
Feladattal kapcsolatos információk, amelyek egy folyamatból származnak egy sablon kiterjesztésekor. További információért tekintse meg a megjegyzéseket. További információ: templateContextA kiterjesztett YAML-folyamatok sablonjai mostantól átadhatók a fázisokra, feladatokra és üzembe helyezésekre vonatkozó környezeti információknak, valamint sablonok – A templateContext használatával adhatja át a tulajdonságokat a sablonoknak.

Megjegyzések

Az alapértelmezett érték timeoutInMinutes 60 perc. További információ: Időtúllépések.

A feladatok feltételesen futtathatók, és a korábbi feladatoktól függhetnek.

Megjegyzés

Ha csak egy fázissal és egy feladatsal rendelkezik, az egyfeladatos szintaxist rövidebb módszerként használhatja a futtatás lépéseinek leírására.

Példák

jobs:
- job: MyJob
  displayName: My First Job
  continueOnError: true
  workspace:
    clean: outputs
  steps:
  - script: echo My first job

Lásd még