Freigeben über


definition jobs.deployment

Ein Bereitstellungsauftrag ist eine spezielle Art von Auftrag. Es ist eine Sammlung von Schritten, die sequenziell für die Umgebung ausgeführt werden sollen.

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

Definitionen, die auf diese Definition verweisen: Aufträge

Eigenschaften

deployment Zeichenfolge. Erforderlich als erste Eigenschaft.
Name des Bereitstellungsauftrags, A-Z, a-z, 0-9 und Unterstrich. Das Wort deploy ist ein Schlüsselwort und wird nicht als Bereitstellungsname unterstützt.

displayName Zeichenfolge.
Lesbarer Name für die Bereitstellung.

dependsOn Zeichenfolge | Zeichenfolgenliste.
Alle Aufträge, die vor diesem Vorgang abgeschlossen werden müssen.

condition Zeichenfolge.
Diesen Bedingungsausdruck auswerten, um zu bestimmen, ob diese Bereitstellung ausgeführt werden soll.

continueOnError Zeichenfolge.
Auch bei Fehlern weiter ausgeführt werden?

timeoutInMinutes Zeichenfolge.
Zeit, bis dieser Auftrag abgeschlossen ist, bevor der Server ihn beendet.

cancelTimeoutInMinutes Zeichenfolge.
Zeit, bis der Auftrag abgebrochen wird, bevor der Auftrag beendet wird.

variables Variablen.
Bereitstellungsspezifische Variablen.

pool Pool-.
Pool, in dem dieser Auftrag ausgeführt wird.

environment jobs.deployment.environment.
Zielumgebungsname und optional ein Ressourcenname zum Aufzeichnen des Bereitstellungsverlaufs; format: environment-name.resource-name.

strategy jobs.deployment.strategy.
Ausführungsstrategie für diese Bereitstellung.

workspace Arbeitsbereich.
Arbeitsbereichsoptionen für den Agent.

uses jobs.job.uses.
Alle Ressourcen, die von diesem Auftrag benötigt werden, auf die noch nicht verwiesen wird.

container jobs.job.container.
Containerressourcenname.

services Zeichenfolgenwörterbuch.
Containerressourcen, die als Dienstcontainer ausgeführt werden sollen.

templateContext templateContext.
Bereitstellungsbezogene Informationen, die bei der Erweiterung einer Vorlage von einer Pipeline übergeben werden. Weitere Informationen finden Sie in den Hinweisen. Weitere Informationen zu templateContextfinden Sie unter Vorlagen für erweiterte YAML-Pipelines können nun Kontextinformationen für Phasen, Aufträge und Bereitstellungen und Vorlagen übergeben werden . Verwenden Sie templateContext, um Eigenschaften an Vorlagenzu übergeben.

Bemerkungen

In YAML-Pipelines empfiehlt das Pipelineteam, Ihre Bereitstellungsschritte in einen Bereitstellungsauftrag zu setzen.

Beispiele

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