ALIYUN::DEVOPS::Pipeline

ALIYUN::DEVOPS::Pipeline类型用于创建流水线API,支持创建YAML化流水线。

语法

{
  "Type": "ALIYUN::DEVOPS::Pipeline",
  "Properties": {
    "Content": String,
    "OrganizationId": String,
    "Name": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

Content

String

流水线YAML描述。

更多信息,请参见YAML初步体验

OrganizationId

String

企业标识,也称企业ID。

字符串形式。您可以在云效访问链接中获取该参数值,例如:

https://devops.aliyun.com/organization/【OrganizationId】

Name

String

流水线名称。

返回值

Fn::GetAtt

PipelineId:流水线ID

示例

  • YAML格式

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      Content:
        Description:
          en: Pipeline description in YAML format.
        Type: String
      Name:
        Description:
          en: Pipeline name.
        Type: String
      OrganizationId:
        Description:
          en: Corporate identity, also known as enterprise id, can obtain in cloud effect
            access links.
        Type: String
    Resources:
      Pipeline:
        Properties:
          Content:
            Ref: Content
          Name:
            Ref: Name
          OrganizationId:
            Ref: OrganizationId
        Type: ALIYUN::DEVOPS::Pipeline
    Outputs:
      PipelineId:
        Description: Pipeline id.
        Value:
          Fn::GetAtt:
          - Pipeline
          - PipelineId
                            
  • JSON格式

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "Content": {
          "Type": "String",
          "Description": {
            "en": "Pipeline description in YAML format."
          }
        },
        "OrganizationId": {
          "Type": "String",
          "Description": {
            "en": "Corporate identity, also known as enterprise id, can obtain in cloud effect access links."
          }
        },
        "Name": {
          "Type": "String",
          "Description": {
            "en": "Pipeline name."
          }
        }
      },
      "Resources": {
        "Pipeline": {
          "Type": "ALIYUN::DEVOPS::Pipeline",
          "Properties": {
            "Content": {
              "Ref": "Content"
            },
            "OrganizationId": {
              "Ref": "OrganizationId"
            },
            "Name": {
              "Ref": "Name"
            }
          }
        }
      },
      "Outputs": {
        "PipelineId": {
          "Description": "Pipeline id.",
          "Value": {
            "Fn::GetAtt": [
              "Pipeline",
              "PipelineId"
            ]
          }
        }
      }
    }