jobs.deployment 정의

배포 작업은 특수한 유형의 작업입니다. 환경에 대해 순차적으로 실행하는 단계의 컬렉션입니다.

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

이 정의를 참조하는 정의: 작업

속성

deployment 문자열. 첫 번째 속성으로 필요합니다.
배포 작업의 이름, A-Z, a-z, 0-9 및 밑줄입니다. deploy라는 단어는 키워드(keyword) 배포 이름으로 지원되지 않습니다.

displayName 문자열.
사람이 읽을 수 있는 배포 이름입니다.

dependsOn string | 문자열 목록입니다.
이 작업 전에 완료해야 하는 모든 작업입니다.

condition 문자열.
이 조건 식을 평가하여 이 배포를 실행할지 여부를 결정합니다.

continueOnError 문자열.
실패하더라도 계속 실행하시겠습니까?

timeoutInMinutes 문자열.
서버가 이 작업을 종료하기 전에 이 작업이 완료되기를 기다리는 시간입니다.

cancelTimeoutInMinutes 문자열.
강제로 종료하기 전에 작업이 취소되기를 기다리는 시간입니다.

variables변수.
배포 관련 변수.

pool.
이 작업이 실행될 풀입니다.

environmentjobs.deployment.environment.
대상 환경 이름 및 배포 기록을 기록할 리소스 이름(선택 사항) format: environment-name.resource-name.

strategyjobs.deployment.strategy.
이 배포에 대한 실행 전략입니다.

workspace작업 영역.
에이전트의 작업 영역 옵션입니다.

usesjobs.job.uses.
아직 참조되지 않은 이 작업에 필요한 모든 리소스입니다.

containerjobs.job.container.
컨테이너 리소스 이름입니다.

services 문자열 사전입니다.
서비스 컨테이너로 실행할 컨테이너 리소스입니다.

templateContext templateContext.
템플릿을 확장할 때 파이프라인에서 전달된 배포 관련 정보입니다. 자세한 내용은 주의를 참조하십시오. 에 대한 templateContext자세한 내용은 이제 확장 YAML 파이프라인 템플릿을 단계, 작업 및 배포에 대한 컨텍스트 정보를 전달할 수 있으며템플릿 - templateContext를 사용하여 템플릿에 속성을 전달합니다.

설명

YAML 파이프라인에서 파이프라인 팀은 배포 단계를 배포 작업에 배치하는 것이 좋습니다.

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