jobs.job 정의

작업은에이전트 또는 서버에서 실행하는 단계의 컬렉션입니다.

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: 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.
  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: 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.
  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: string # Which parts of the workspace should be scorched before fetching.
  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: string # Scorch the repo before fetching?
  steps: [ task | script | powershell | pwsh | bash | checkout | download | downloadBuild | publish | template ] # 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.
  services: # Container resources to run as a service container.
    string: string # Name/value pairs
  workspace: # Workspace options on the agent.
    clean: string # Scorch the repo before fetching?
  steps: [ task | script | powershell | pwsh | bash | checkout | download | downloadBuild | publish | template ] # A list of steps to run.

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

속성

job 문자열. 첫 번째 속성으로 필요합니다.
작업의 ID입니다. 허용되는 값: 유효한 이름에는 영숫자 문자와 '_'만 포함될 수 있으며 숫자로 시작할 수 없습니다.

displayName 문자열.
사람이 읽을 수 있는 작업의 이름입니다.

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

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

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

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

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

variables변수.
작업별 변수입니다.

strategyjobs.job.strategy.
이 작업에 대한 실행 전략입니다.

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

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

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

workspace작업 영역.
에이전트의 작업 영역 옵션입니다. 클린 옵션을 포함하여 작업 영역에 대한 자세한 내용은 작업의 작업 영역 항목을 참조하세요.

usesjobs.job.uses.
아직 참조되지 않은 이 작업에 필요한 모든 리소스입니다. 에 대한 uses자세한 내용은 참조된 Azure DevOps 리포지토리로 작업 권한 부여 scope 제한을 참조하세요.

steps단계.
실행할 단계 목록입니다.

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

설명

기본값 timeoutInMinutes 은 60분으로 설정됩니다. 자세한 내용은 시간 제한을 참조하세요.

작업은 조건부로 실행할 수 있으며 이전 작업에 따라 달라질 수 있습니다.

참고

하나의 단계와 하나의 작업만 있는 경우 단일 작업 구문을 더 짧은 방법으로 사용하여 실행 단계를 설명할 수 있습니다.

jobs:
- job: MyJob
  displayName: My First Job
  continueOnError: true
  workspace:
    clean: outputs
  steps:
  - script: echo My first job

참고 항목