definizione jobs.deployment
Un processo di distribuzione è un tipo speciale di processo. Si tratta di una raccolta di passaggi da eseguire in sequenza nell'ambiente.
jobs:
- deployment: string # Required as first property. Name of the deployment job, A-Z, a-z, 0-9, and underscore. The word deploy is a keyword and is unsupported as the deployment name.
displayName: string # Human-readable name for the deployment.
dependsOn: string | [ string ] # Any jobs which must complete before this one.
condition: string # Evaluate this condition expression to determine whether to run this deployment.
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 ] # Deployment-specific variables.
pool: string | pool # Pool where this job will run.
environment: string | environment # Target environment name and optionally a resource name to record the deployment history; format: environment-name.resource-name.
strategy: strategy # Execution strategy for this deployment.
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.
container: string | container # Container resource name.
services: # Container resources to run as a service container.
string: string # Name/value pairs
templateContext: # Deployment related information passed from a pipeline when extending a template.
jobs:
- deployment: string # Required as first property. Name of the deployment job, A-Z, a-z, 0-9, and underscore. The word deploy is a keyword and is unsupported as the deployment name.
displayName: string # Human-readable name for the deployment.
dependsOn: string | [ string ] # Any jobs which must complete before this one.
condition: string # Evaluate this condition expression to determine whether to run this deployment.
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 ] # Deployment-specific variables.
pool: string | pool # Pool where this job will run.
environment: string | environment # Target environment name and optionally a resource name to record the deployment history; format: environment-name.resource-name.
strategy: strategy # Execution strategy for this deployment.
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.
container: string | container # Container resource name.
services: # Container resources to run as a service container.
string: string # Name/value pairs
jobs:
- deployment: string # Required as first property. Name of the deployment job, A-Z, a-z, 0-9, and underscore. The word deploy is a keyword and is unsupported as the deployment name.
displayName: string # Human-readable name for the deployment.
dependsOn: string | [ string ] # Any jobs which must complete before this one.
condition: string # Evaluate this condition expression to determine whether to run this deployment.
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 ] # Deployment-specific variables.
pool: string | pool # Pool where this job will run.
environment: string | environment # Target environment name and optionally a resource name to record the deployment history; format: environment-name.resource-name.
strategy: strategy # Execution strategy for this deployment.
workspace: # Workspace options on the agent.
clean: outputs | resources | all # Which parts of the workspace should be scorched before fetching.
container: string | container # Container resource name.
services: # Container resources to run as a service container.
string: string # Name/value pairs
Definizioni che fanno riferimento a questa definizione: processi
Proprietà
deployment
stringa. Obbligatorio come prima proprietà.
Nome del processo di distribuzione, A-Z, a-z, 0-9 e carattere di sottolineatura. La parola deploy è una parola chiave e non è supportata come nome della distribuzione.
displayName
stringa.
nome leggibile per la distribuzione.
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 questa distribuzione.
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 della distribuzione.
pool
pool.
Pool in cui verrà eseguito il processo.
environment
jobs.deployment.environment.
Nome dell'ambiente di destinazione e facoltativamente un nome di risorsa per registrare la cronologia di distribuzione; format: environment-name.resource-name.
strategy
jobs.deployment.strategy.
strategia di esecuzione per questa distribuzione.
workspace
'area di lavoro.
Opzioni dell'area di lavoro nell'agente.
uses
jobs.job.uses.
Tutte le risorse richieste da questo processo a cui non si fa già riferimento.
container
jobs.job.container.
nome della risorsa contenitore.
services
dizionario di stringhe.
Risorse contenitore da eseguire come contenitore del servizio.
templateContext
templateContext.
Informazioni correlate alla distribuzione 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:
Nelle pipeline YAML il team delle pipeline consiglia di inserire i passaggi di distribuzione in un processo di distribuzione.
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:
# track deployments on the environment
- deployment: DeployWeb
displayName: deploy Web App
pool:
vmImage: ubuntu-latest
# creates an environment if it doesn't exist
environment: 'smarthotel-dev'
strategy:
# default deployment strategy, more coming...
runOnce:
deploy:
steps:
- script: echo my first deployment