definizione 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: outputs | resources | all # 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: outputs | resources | all # 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: outputs | resources | all # 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.
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 non possono iniziare con un numero.
displayName
stringa.
nome leggibile per il processo.
dependsOn
stringa | 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 per il completamento del processo prima che il server lo termina.
cancelTimeoutInMinutes
stringa.
Tempo di attesa dell'annullamento del processo prima di terminarlo forzatamente.
variables
variabili.
variabili specifiche del processo.
strategy
jobs.job.strategy.
strategia di esecuzione per questo processo.
pool
pool.
Pool in cui verrà eseguito il processo.
container
jobs.job.container.
nome della risorsa contenitore.
services
dizionario di stringhe.
Risorse contenitore da eseguire come contenitore del servizio.
workspace
'area di lavoro.
Opzioni dell'area di lavoro nell'agente. Per altre informazioni sulle aree di lavoro, incluse le opzioni pulite, vedere l'argomento dell'area di lavoro di in Processi.
uses
jobs.job.uses.
Tutte le risorse richieste da questo processo a cui non si fa già riferimento. Per altre informazioni su uses
, vedere Limitare l'ambito di autorizzazione del processo ai repository Di Azure DevOps a cui si fa riferimento.
steps
passaggi.
Elenco di passaggi da eseguire.
templateContext
templateContext.
Informazioni correlate al processo passate da una pipeline durante l'estensione di un modello. Per altre informazioni, vedere le osservazioni. Per altre informazioni su templateContext
, vedere modelli di pipeline YAML estese possono ora essere passate informazioni di contesto per fasi, processi e distribuzioni e modelli - Usare templateContext per passare proprietà ai modelli.
Osservazioni:
Il timeoutInMinutes
predefinito è impostato su 60 minuti. Per altre informazioni, vedere timeout.
I processi possono essere eseguiti in modo condizionale e potrebbero dipendono dai processi precedenti.
Nota
Se si dispone di una sola fase e di un processo, è possibile usare sintassi a processo singolo come modo più breve per descrivere i passaggi da eseguire.
Per altre informazioni su templateContext
, vedere modelli di pipeline YAML estese possono ora essere passate informazioni di contesto per fasi, processi e distribuzioni e modelli - Usare templateContext per passare proprietà ai modelli.
Esempi
jobs:
- job: MyJob
displayName: My First Job
continueOnError: true
workspace:
clean: outputs
steps:
- script: echo My first job
Vedere anche
- Per altre informazioni su
uses
, vedere Limitare l'ambito di autorizzazione del processo ai repository Di Azure DevOps a cui si fa riferimento. - Per altre informazioni sulle aree di lavoro, incluse le opzioni pulite, vedere l'argomento dell'area di lavoro di in Processi.
- Altre informazioni sulle variabili , passaggi, pool di e processi del server .