YAML schema reference

YAML schema reference

Azure Pipelines

Here's a detailed reference guide to Azure Pipelines YAML pipelines, including a catalog of all supported YAML capabilities, and the available options.

The best way to get started with YAML pipelines is through the quickstart guide. After that, to learn how to configure your YAML pipeline the way you need it to work, see conceptual topics such as Build variables and Jobs.

Pipeline structure

Pipelines are made of one or more jobs and may include resources and variables. Jobs are made of one or more steps plus some job-specific data. Steps can be tasks, scripts, or references to external templates. This is reflected in the structure of the YAML file.

  • Pipeline
    • Job 1
      • Step 1.1
      • Step 1.2
      • ...
    • Job 2
      • Step 2.1
      • Step 2.2
      • ...
    • ...

For simpler pipelines, not all of these levels are required. For example, in a single-job build, you can omit the container for "jobs" since there are only steps. Also, many options shown here are optional and have good defaults, so your YAML definitions are unlikely to include all of them.

Conventions

Conventions used in this topic:

  • To the left of : are literal keywords used in pipeline definitions.
  • To the right of : are data types. These can be primitives like string or references to rich structures defined elsewhere in this topic.
  • [ datatype ] indicates an array of the mentioned data type. For instance, [ string ] is an array of strings.
  • { datatype : datatype } indicates a mapping of one data type to another. For instance, { string: string } is a mapping of strings to strings.
  • | indicates there are multiple data types available for the keyword. For instance, job | templateReference means either a job definition or a template reference are allowed.

YAML basics

This document covers the schema of an Azure Pipelines YAML file. To learn the basics of YAML, see Learn YAML in Y Minutes. Note: Azure Pipelines doesn't support all features of YAML, such as complex keys and sets.

https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema

转载于:https://www.cnblogs.com/oskb/p/9967481.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值