すべてのプロダクト
Search
ドキュメントセンター

Resource Orchestration Service:ALIYUN::DEVOPS::PipelineRun

最終更新日:Mar 17, 2025

ALIYUN::DEVOPS::PipelineRun は、パイプラインを実行するために使用されます。

構文

{
  "Type": "ALIYUN::DEVOPS::PipelineRun",
  "Properties": {
    "PipelineId": Number,
    "Params": Map,
    "OrganizationId": String,
    "Sync": Boolean,
    "Timeout": Integer
  }
}

プロパティ

プロパティ

タイプ

必須

編集可能

説明

制約

PipelineId

Number

はい

いいえ

パイプライン ID。

パイプライン ID は、パイプライン URL から取得できます。URL の例:https://flow.aliyun.com/pipelines/[PipelineId]/current 5ebbc0228123212b59xxxxx

Params

Map

いいえ

いいえ

パイプラインの実行に使用されるパラメーター。

有効な値:

  • branchModeBranchs: パイプラインがブランチモードで実行される場合の実行ブランチ。

  • envs: パイプラインの実行に使用される変数。

  • runningBranchs: リポジトリアドレスをキーとする実行ブランチ。

  • runningTags: リポジトリアドレスをキーとする実行タグ。

例:

{
  "branchModeBranchs": [
    "branch1",
    "branch2"
  ],
  "envs": {
    "k1": "v1",
    "k2": "v2",
    "k3": "v3"
  },
  "runningBranchs": {
    "https://codeup.aliyun.com/60c1abb32c5969c370c5****/Codeup-Demo.git": "master1"
  },
  "runningTags": {
    "https://codeup.aliyun.com/60c1abb32c5969c370c5****/Codeup-Demo.git": "1.0"
  }
}

OrganizationId

String

はい

いいえ

組織ワークスペースの ID。

値は文字列型です。組織ワークスペースの ID は、Apsara DevOps の URL から取得できます。URL の例:https://devops.aliyun.com/organization/[OrganizationId]

Sync

Boolean

いいえ

いいえ

パイプラインの実行結果を同期的に待機するかどうかを指定します。

有効な値:

  • true: パイプラインの実行結果を同期的に待機します。

    値を true に設定すると、パイプラインが実行されるまでリソースは作成されません。

  • false (デフォルト): パイプラインの実行結果を非同期的に待機します。

説明

パイプラインに中断ポリシーが設定されている場合は、値を true に設定しないことをお勧めします。これは、リリースプロセスに手動操作が必要であり、同期には適していないためです。

Timeout

Integer

いいえ

いいえ

パイプラインを実行するための最大タイムアウト期間。

単位:分。

Sync を true に設定する場合は、このプロパティを指定する必要があります。

デフォルト値: 10。

戻り値

Fn::GetAtt

PipelineRunId: パイプラインを実行するインスタンスの ID。

  • YAML 形式

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      OrganizationId:
        Description:
          ja: 企業 ID。エンタープライズ ID とも呼ばれ、クラウド効果アクセスリンクで取得できます。
        Type: String
      Params:
        Description:
          ja: 'パイプライン操作パラメーター。キー:
    
            - **branchModeBranchs**: ブランチモードで実行されるブランチ。
    
            - **envs**: 実行変数。
    
            - **runningBranchs**: キーがウェアハウスアドレスである実行ブランチ。
    
            - **runningTags**: キーがウェアハウスアドレスである実行タグ。'
        Type: Json
      PipelineId:
        Description:
          ja: パイプライン ID。パイプラインリンクから取得できます。
        Type: Number
    Resources:
      PipelineRun:
        Properties:
          OrganizationId:
            Ref: OrganizationId
          Params:
            Ref: Params
          PipelineId:
            Ref: PipelineId
        Type: ALIYUN::DEVOPS::PipelineRun
    Outputs:
      PipelineRunId:
        Description: パイプライン実行 ID。
        Value:
          Fn::GetAtt:
          - PipelineRun
          - PipelineRunId
                            
  • JSON 形式

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "PipelineId": {
          "Type": "Number",
          "Description": {
            "ja": "パイプライン ID。パイプラインリンクから取得できます。"
          }
        },
        "Params": {
          "Type": "Json",
          "Description": {
            "ja": "パイプライン操作パラメーター。キー:\n- **branchModeBranchs**: ブランチモードで実行されるブランチ。\n- **envs**: 実行変数。\n- **runningBranchs**: キーがウェアハウスアドレスである実行ブランチ。\n- **runningTags**: キーがウェアハウスアドレスである実行タグ。"
          }
        },
        "OrganizationId": {
          "Type": "String",
          "Description": {
            "ja": "企業 ID。エンタープライズ ID とも呼ばれ、クラウド効果アクセスリンクで取得できます。"
          }
        }
      },
      "Resources": {
        "PipelineRun": {
          "Type": "ALIYUN::DEVOPS::PipelineRun",
          "Properties": {
            "PipelineId": {
              "Ref": "PipelineId"
            },
            "Params": {
              "Ref": "Params"
            },
            "OrganizationId": {
              "Ref": "OrganizationId"
            }
          }
        }
      },
      "Outputs": {
        "PipelineRunId": {
          "Description": "パイプライン実行 ID。",
          "Value": {
            "Fn::GetAtt": [
              "PipelineRun",
              "PipelineRunId"
            ]
          }
        }
      }
    }