definizione di jobs.job

Un processo è una raccolta di passaggi eseguiti da un agente o in un server.

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.

Definizioni che fanno riferimento a questa definizione: processi

Proprietà

job Stringa. Obbligatorio come prima proprietà.
ID del processo. Valori accettabili: i nomi validi possono contenere solo caratteri alfanumerici e '_' e potrebbero non iniziare con un numero.

displayName Stringa.
Nome leggibile per il processo.

dependsOn string | elenco di stringhe.
Tutti i processi che devono essere completati prima di questo.

condition Stringa.
Valutare questa espressione di condizione per determinare se eseguire questo processo.

continueOnError Stringa.
Continuare l'esecuzione anche in caso di errore?

timeoutInMinutes Stringa.
Tempo di attesa del completamento del processo prima che il server lo completi.

cancelTimeoutInMinutes Stringa.
Tempo di attesa dell'annullamento del processo prima di terminarlo forzatamente.

variablesvariabili.
Variabili specifiche del processo.

strategyjobs.job.strategy.
Strategia di esecuzione per questo processo.

poolpiscina.
Pool in cui verrà eseguito il processo.

containerjobs.job.container.
Nome risorsa contenitore.

services dizionario stringa.
Risorse del contenitore da eseguire come contenitore del servizio.

workspacearea di lavoro.
Opzioni dell'area di lavoro nell'agente. Per altre informazioni sulle aree di lavoro, incluse le opzioni pulite, vedere l'argomento relativo all'area di lavoro in Processi.

usesjobs.job.uses.
Tutte le risorse richieste da questo processo a cui non è già fatto riferimento. Per altre informazioni su uses, vedere Limitare l'ambito di autorizzazione del processo ai repository Azure DevOps a cui si fa riferimento.

stepspassaggi.
Elenco dei passaggi da eseguire.

templateContext templateContext.
Informazioni correlate al processo passate da una pipeline durante l'estensione di un modello. Per ulteriori informazioni, vedere la sezione Osservazioni. Per altre informazioni su templateContext, vedere Modelli di pipeline YAML estesi possono ora essere passate informazioni di contesto per fasi, processi e distribuzioni emodelli - Usare templateContext per passare le proprietà ai modelli.

Commenti

Il valore predefinito timeoutInMinutes è impostato su 60 minuti. Per altre informazioni, vedere Timeout.

I processi possono essere eseguiti in modo condizionale e possono dipendere dai processi precedenti.

Nota

Se si dispone di una sola fase e di un processo, è possibile usare la sintassi a processo singolo come modo più breve per descrivere i passaggi da eseguire.

Esempi

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

Vedere anche