jobs.deployment tanımı

Dağıtım işi özel bir iş türüdür. Bu, ortama karşı sıralı olarak çalıştırılacak adımlardan oluşan bir koleksiyondur.

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

Bu tanıma başvuran tanımlar: jobs

Özellikler

deployment Dize. İlk özellik olarak gereklidir.
Dağıtım işinin adı, A-Z, a-z, 0-9 ve alt çizgi. Deploy sözcüğü bir anahtar sözcüktür ve dağıtım adı olarak desteklenmez.

displayName Dize.
Dağıtım için insan tarafından okunabilen ad.

dependsOn dize | dize listesi.
Bundan önce tamamlanması gereken tüm işler.

condition Dize.
Bu dağıtımın çalıştırılıp çalıştırılmayacağını belirlemek için bu koşul ifadesini değerlendirin.

continueOnError Dize.
Hata durumunda bile çalışmaya devam mı edin?

timeoutInMinutes Dize.
Sunucu sonlandırmadan önce bu işin tamamlanmasını bekleme süresi.

cancelTimeoutInMinutes Dize.
zorla sonlandırmadan önce işin iptal edilmesi için bekleme süresi.

variablesdeğişkenlerini seçin.
Dağıtıma özgü değişkenler.

poolhavuzuna bakın.
Bu işin çalıştırılacağı havuz.

environmentjobs.deployment.environment.
Hedef ortam adı ve isteğe bağlı olarak dağıtım geçmişini kaydetmek için bir kaynak adı; format: environment-name.resource-name.

strategyjobs.deployment.strategy.
Bu dağıtım için yürütme stratejisi.

workspaceçalışma alanını seçin.
Aracıdaki çalışma alanı seçenekleri.

usesjobs.job.uses.
Bu işin gerektirdiği ve henüz başvurulmayan tüm kaynaklar.

containerjobs.job.container.
Kapsayıcı kaynak adı.

services dize sözlüğü.
Hizmet kapsayıcısı olarak çalıştırılacak kapsayıcı kaynakları.

templateContext templateContext.
Bir şablon genişletilirken işlem hattından geçirilen dağıtımla ilgili bilgiler. Daha fazla bilgi için açıklamalara bakın. hakkında templateContextdaha fazla bilgi için bkz. Genişletilmiş YAML İşlem Hatları şablonları artık aşamalar, işler ve dağıtımlar için bağlam bilgileri geçirilebilir veŞablonlar - Şablonlara özellik geçirmek için templateContext kullanma.

Açıklamalar

YAML işlem hatlarında işlem hatları ekibi, dağıtım adımlarınızı bir dağıtım işine yerleştirmenizi önerir.

Örnekler

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