jobs.deployment definíció

Az üzembehelyezési feladat egy speciális típusú feladat. Ez a környezeten egymást követő futtatás lépéseinek gyűjteménye.

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

A definícióra hivatkozó definíciók: feladatok

Tulajdonságok

deployment Karakterlánc. Első tulajdonságként kötelező megadni.
Az üzembehelyezési feladat neve, A-Z, a-z, 0-9 és aláhúzás. Az üzembe helyezés szó egy kulcsszó, és nem támogatott az üzembe helyezés neveként.

displayName Karakterlánc.
Az üzembe helyezés emberi olvasásra alkalmas neve.

dependsOn sztring | sztringlista.
Minden olyan feladat, amelynek ezen előtt be kell fejeződnie.

condition Karakterlánc.
Értékelje ki ezt a feltételkifejezést annak megállapításához, hogy futtatni kívánja-e ezt az üzemelő példányt.

continueOnError Karakterlánc.
Továbbra is fut hiba esetén?

timeoutInMinutes Karakterlánc.
Várjon, amíg a feladat befejeződik, mielőtt a kiszolgáló leáll.

cancelTimeoutInMinutes Karakterlánc.
Várjon, amíg a feladat megszakítja a műveletet, mielőtt kényszerítetten leállna.

variablesváltozók.
Üzembe helyezés-specifikus változók.

poolkészletben.
Készlet, ahol a feladat futni fog.

environmentjobs.deployment.environment.
Célkörnyezet neve és opcionálisan egy erőforrásnév az üzembehelyezési előzmények rögzítéséhez; format: environment-name.resource-name.

strategyjobs.deployment.strategy.
Az üzembe helyezés végrehajtási stratégiája.

workspacemunkaterületet.
Munkaterület-beállítások az ügynökön.

usesjobs.job.uses.
A feladathoz szükséges erőforrások, amelyekre még nem hivatkoztak.

containerjobs.job.container.
Tárolóerőforrás neve.

services sztringszótár.
Szolgáltatástárolóként futtatandó tárolóerőforrások.

templateContext templateContext.
A sablon kiterjesztésekor a folyamatból átadott üzembe helyezéssel kapcsolatos információk. További információért tekintse meg a megjegyzéseket. További információ a szolgáltatásról templateContext: A kiterjesztett YAML-folyamatsablonok mostantól átadhatók a szakaszokra, feladatokra és üzemelő példányokra vonatkozó környezeti információknak, valamint sablonok – A templateContext használatával tulajdonságokat adhat át a sablonoknak.

Megjegyzések

A YAML-folyamatokban a folyamatokért felelős csapat azt javasolja, hogy az üzembehelyezési lépéseket helyezze üzembehelyezési feladatba.

Példák

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