Delen via


jobs.deployment definitie

Een implementatietaak is een speciaal type taak. Het is een verzameling stappen voor het sequentieel uitvoeren 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: outputs | resources | all # What to clean up before the job runs.
  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 # What to clean up before the job runs.
  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 # What to clean up before the job runs.
  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 implementatienaam.

displayName tekenreeks.
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 doodt.

cancelTimeoutInMinutes tekenreeks.
Tijd om te wachten totdat de taak wordt geannuleerd voordat deze geforceerd wordt beëindigd.

variables variabelen.
implementatiespecifieke variabelen.

pool zwembad.
pool waar deze taak wordt uitgevoerd.

environment banen.implementatie.omgeving.
naam van de doelomgeving en eventueel een resourcenaam om de implementatiegeschiedenis vast te leggen; indeling: environment-name.resource-name.

strategy banen.implementatie.strategie.
uitvoeringsstrategie voor deze implementatie.

workspace werkruimte.
werkruimteopties op de agent.

Zie het onderwerp werkruimte in Takenvoor meer informatie over werkruimten, inclusief schone opties.

uses jobs.job.gebruikt.
Hiermee geeft u resources op die vereist zijn voor deze taak die nog niet elders in de pijplijn worden genoemd, bijvoorbeeld door een uitcheckstap of een opslagplaatsresource. Zie uses en 'gebruikt' voor het vooraf declareren van resources voor meer informatie.

container banen.baan.container.
containerresourcenaam.

services tekenreekswoordenlijst.
Container-resources die moeten worden uitgevoerd als een servicecontainer.

templateContext sjabloonContext.
informatie over implementatie die is doorgegeven vanuit een pijplijn bij het uitbreiden van een sjabloon. Zie opmerkingen voor meer informatie. Zie voor meer informatie over templateContextuitgebreide YAML Pipelines-sjablonen nu contextinformatie kunnen worden doorgegeven voor fasen, taken en implementaties en -sjablonen- TemplateContext gebruiken om eigenschappen door te geven aan sjablonen.

Opmerkingen

In YAML-pijplijnen raadt het pijplijnenteam u aan uw implementatiestappen in een implementatietaak te plaatsen.

Zie voor meer informatie over templateContextuitgebreide YAML Pipelines-sjablonen nu contextinformatie kunnen worden doorgegeven voor fasen, taken en implementaties en -sjablonen- TemplateContext gebruiken om eigenschappen door te geven aan sjablonen.

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