jobs:
- job: string # Required as first property. ID of the job.
displayName: string # Human-readable name for the job.
dependsOn: string | [ string ] # Any jobs which must complete before this one.
condition: string # Evaluate this condition expression to determine whether to run this job.
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 ] # Job-specific variables.
strategy: strategy # Execution strategy for this job.
pool: string | pool # Pool where this job will run.
container: string | container # Container resource name.
services: # Container resources to run as a service container.
string: string # Name/value pairs
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.
steps: [ task | script | powershell | pwsh | bash | checkout | download | downloadBuild | getPackage | publish | template | reviewApp ] # A list of steps to run.
templateContext: # Job related information passed from a pipeline when extending a template.
jobs:
- job: string # Required as first property. ID of the job.
displayName: string # Human-readable name for the job.
dependsOn: string | [ string ] # Any jobs which must complete before this one.
condition: string # Evaluate this condition expression to determine whether to run this job.
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 ] # Job-specific variables.
strategy: strategy # Execution strategy for this job.
pool: string | pool # Pool where this job will run.
container: string | container # Container resource name.
services: # Container resources to run as a service container.
string: string # Name/value pairs
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.
steps: [ task | script | powershell | pwsh | bash | checkout | download | downloadBuild | getPackage | publish | template | reviewApp ] # A list of steps to run.
jobs:
- job: string # Required as first property. ID of the job.
displayName: string # Human-readable name for the job.
dependsOn: string | [ string ] # Any jobs which must complete before this one.
condition: string # Evaluate this condition expression to determine whether to run this job.
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 ] # Job-specific variables.
strategy: strategy # Execution strategy for this job.
pool: string | pool # Pool where this job will run.
container: string | container # Container resource name.
services: # Container resources to run as a service container.
string: string # Name/value pairs
workspace: # Workspace options on the agent.
clean: outputs | resources | all # What to clean up before the job runs.
steps: [ task | script | powershell | pwsh | bash | checkout | download | downloadBuild | getPackage | publish | template | reviewApp ] # A list of steps to run.
이 정의를 참조하는 정의: 작업
속성
job
문자열입니다. 첫 번째 속성으로 필요합니다.
작업의 ID입니다. 허용되는 값: 유효한 이름에는 영숫자 문자와 '_'만 포함될 수 있으며 숫자로 시작할 수 없습니다.
displayName
문자열입니다.
작업에 대한 사람이 읽을 수 있는 이름입니다.
dependsOn
string | 문자열 목록입니다.
이 작업 전에 완료해야 하는 모든 작업입니다.
condition
문자열입니다.
이 조건 식을 평가하여 이 작업을 실행할지 여부를 결정합니다.
continueOnError
문자열입니다.
실패하더라도 계속 실행하시겠습니까?
timeoutInMinutes
문자열입니다.
서버가 이 작업을 종료하기 전에 이 작업이 완료되기를 기다리는 시간입니다.
cancelTimeoutInMinutes
문자열입니다.
강제로 종료하기 전에 작업이 취소되기를 기다리는 시간입니다.
변수variables
.
작업별 변수입니다.
jobs.job.strategystrategy
.
이 작업에 대한 실행 전략입니다.
pool
풀.
이 작업이 실행되는 풀입니다.
jobs.job.containercontainer
.
컨테이너 리소스 이름입니다.
문자열 사전을 services
.
컨테이너 리소스를 서비스 컨테이너로 실행할 .
uses
jobs.job.uses.
체크 아웃 단계 또는 리포지토리 리소스와 같이 파이프라인의 다른 위치에서 아직 참조되지 않은 이 작업에 필요한 리소스를 지정합니다. 자세한 내용은 미리 선언된 리소스에 대한 uses
작업 권한 부여 범위 제한 및 "uses" 문을 참조하세요.
단계를 steps
.
실행할 단계 목록입니다.
templateContext
templateContext.
템플릿을 확장할 때 파이프라인에서 전달된 작업 관련 정보입니다. 자세한 내용은 비고를 참조하세요. 자세한 templateContext
내용은 확장 YAML 파이프라인 템플릿을 단계, 작업 및 배포 및 템플릿에 대한 컨텍스트 정보를 전달할 수 있습니다 . templateContext를 사용하여 템플릿에 속성을 전달합니다.
비고
기본값 timeoutInMinutes
은 60분으로 설정됩니다. 자세한 내용은 시간 제한을 참조 하세요.
작업은 조건부로 실행할 수 있으며 이전 작업따라 달라질 수 있습니다.
비고
한 단계와 하나의 작업만 있는 경우 단일 작업 구문 사용하여 실행 단계를 더 짧은 방법으로 설명할 수 있습니다.
자세한 templateContext
내용은 확장 YAML 파이프라인 템플릿을 단계, 작업 및 배포 및 템플릿에 대한 컨텍스트 정보를 전달할 수 있습니다 . templateContext를 사용하여 템플릿에 속성을 전달합니다.
예시
jobs:
- job: MyJob
displayName: My First Job
continueOnError: true
workspace:
clean: outputs
steps:
- script: echo My first job