definitie van jobs.deployment

Een implementatietaak is een speciaal type taak. Het is een verzameling stappen die sequentieel moet worden uitgevoerd op basis van de omgeving.

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: 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.
  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: 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.
  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: string # 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

Definities die naar deze definitie verwijzen: taken

Eigenschappen

deployment Tekenreeks. Vereist als eerste eigenschap.
Naam van de implementatietaak, A-Z, a-z, 0-9 en onderstrepingsteken. Het woord implementeren is een trefwoord en wordt niet ondersteund als de naam van de implementatie.

displayName Tekenreeks.
Door mensen leesbare naam voor de implementatie.

dependsOn tekenreeks | tekenreekslijst.
Alle taken die vóór deze taak moeten worden voltooid.

condition Tekenreeks.
Evalueer deze voorwaardeexpressie om te bepalen of deze implementatie moet worden uitgevoerd.

continueOnError Tekenreeks.
Doorgaan met uitvoeren, zelfs bij een fout?

timeoutInMinutes Tekenreeks.
Tijd om te wachten tot deze taak is voltooid voordat de server deze beëindigt.

cancelTimeoutInMinutes Tekenreeks.
Tijd om te wachten totdat de taak wordt geannuleerd voordat u deze geforceerd beëindigt.

variablesvariabelen.
Implementatiespecifieke variabelen.

poolzwembad.
Pool waar deze taak wordt uitgevoerd.

environmentjobs.deployment.environment.
De naam van de doelomgeving en optioneel een resourcenaam om de implementatiegeschiedenis vast te leggen; format: environment-name.resource-name.

strategyjobs.deployment.strategy.
Uitvoeringsstrategie voor deze implementatie.

workspacewerkruimte.
Werkruimteopties op de agent.

usesjobs.job.uses.
Alle resources die voor deze taak zijn vereist en waarnaar nog niet wordt verwezen.

containerjobs.job.container.
Naam van containerresource.

services tekenreekswoordenlijst.
Containerresources die moeten worden uitgevoerd als een servicecontainer.

templateContext templateContext.
Implementatiegerelateerde informatie die vanuit een pijplijn wordt doorgegeven bij het uitbreiden van een sjabloon. Zie opmerkingen voor meer informatie. Zie Extended YAML Pipelines templates can now be passed context information for stages, jobs, and deployments (Extended YAML Pipelines templates can now be passed context information for stages, jobs, and deployments) enTemplates - Use templateContext to pass properties to templates (Sjablonen gebruiken om eigenschappen door te geven aan sjablonen) voor meer informatie overtemplateContext.

Opmerkingen

In YAML-pijplijnen raadt het pijplijnteam aan dat u de implementatiestappen in een implementatietaak plaatst.

Voorbeelden

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