子パイプライン ステップのオプション

子パイプラインでは、パイプライン内で別のパイプラインをトリガーするステップを定義できます。これにより、より複雑なワークフローをモジュール化して効率化し、パイプライン内での並列処理を向上させることができます。「パイプライン ステップ内のパイプライン」を定義するには、次のオプションを使用します。子パイプライン (パイプライン内のパイプライン) ステップでは type: pipeline を使用します。

custom プロパティ

custom オプションは、子パイプライン ステップの実行時に実行されるカスタム パイプラインを定義するために使用されます。

プロパティstep

必須 — はい (type: pipeline の場合)

データ タイプ — 文字列 (カスタム パイプラインの名前と一致する必要がある)

指定可能な親プロパティstep

指定可能な子プロパティ — なし


The input variables property

The input-variables property is used to define variables that can be passed from the parent pipeline into the child pipeline. Once passed, these variables are considered pipeline variables for the child pipeline.

There is a limit of 20 input-variables for a pipeline step.

プロパティinput-variables

必須 — いいえ

Data type — Key-value pair (YAML spec - Block Mappings)

指定可能な値 — 有効な変数名

  • Names can only contain ASCII letters, digits, and underscores

  • 名前の先頭を数字にすることはできません。

Allowed parent properties — step

Example: Using the input-variables option to define variables, which can be exposed to the child pipeline.

pipelines: custom: a-parent-pipeline: - variables: - name: parent_pipeline_variable default: "val1" allowed-values: - "val1" - "val2" - step: name: 'Child pipeline' type: pipeline custom: a-child-pipeline input-variables: var_1: $parent_pipeline_variable var_2: $repository_variable_name var_3: $workspace_variable_name var_4: "static-value-1" var_5: "static-value-2" a-child-pipeline: - step: name: 'Child Pipeline step' script: - echo "Parent Pipeline Step Variable -" $var_1 - echo "Parent Pipeline Step Variable -" $var_2

script プロパティ

script プロパティは実行されないため、子パイプライン ステップには含めないでください。代わりに、custom プロパティによって参照される子パイプラインのステップが実行されます。


Restricted properties

子パイプライン ステップは、パイプライン内で別のパイプラインを実行するための単なるトリガーです。たとえば、子パイプライン ステップでアーティファクトを定義することは、子パイプライン ステップから生成されるアーティファクトがないことから無効です。ただし、子パイプライン自体に含まれるステップではアーティファクトが生成される場合があります。

次のプロパティはパイプライン ステップではサポートされていないため、type: pipeline を使用する際に含めないでください。子パイプラインではサポートされていない deployment を除いて、これらのプロパティは子パイプライン自体の内部で使用する必要があります。

  • deployment

  • Stage

  • size

  • ランタイム

  • output-variables

  • Cache

  • artifacts

  • runs-on

  • image

  • clone

  • oidc

  • services

さらにヘルプが必要ですか?

アトラシアン コミュニティをご利用ください。