AWS CloudFormation
User Guide (API Version 2010-05-15)
AWS 服务或AWS文档中描述的功能,可能因地区/位置而异。请点击 Amazon AWS 入门,可查看中国地区的具体差异

AWS::CodePipeline::CustomActionType

AWS::CodePipeline::CustomActionType 资源为 AWS CodePipeline 默认操作不包含的活动创建自定义操作,如运行内部开发的构建流程或测试套件。您可以在管道的阶段中使用这些自定义操作。有关更多信息,请参阅 AWS CodePipeline 用户指南 中的在 AWS CodePipeline 中创建和添加自定义操作

语法

要在 AWS CloudFormation 模板中声明此实体,请使用以下语法:

JSON

{ "Type" : "AWS::CodePipeline::CustomActionType", "Properties" : { "Category" : String, "ConfigurationProperties" : [ ConfigurationProperties, ... ], "InputArtifactDetails" : ArtifactDetails, "OutputArtifactDetails" : ArtifactDetails, "Provider" : String, "Settings" : Settings, "Version" : String } }

YAML

Type: "AWS::CodePipeline::CustomActionType" Properties: Category: String, ConfigurationProperties: - ConfigurationProperties InputArtifactDetails: ArtifactDetails OutputArtifactDetails: ArtifactDetails Provider: String Settings: Settings Version: String

属性

Category

自定义操作的类别,如源代码操作或构建操作。有关有效值的信息,请参阅 AWS CodePipeline API 参考 中的 CreateCustomActionType

Required: Yes

Type: String

更新要求替换

ConfigurationProperties

自定义操作的配置属性。

Required: No

Type: AWS CodePipeline CustomActionType ConfigurationProperties 列表

更新要求替换

InputArtifactDetails

此自定义操作的输入项目详细信息。

Required: Yes

Type: AWS CodePipeline CustomActionType ArtifactDetails

更新要求替换

OutputArtifactDetails

此自定义操作的输出项目详细信息。

Required: Yes

Type: AWS CodePipeline CustomActionType ArtifactDetails

更新要求替换

Provider

AWS CodePipeline 用于此自定义操作的服务提供程序的名称。

Required: Yes

Type: String

更新要求替换

Settings

为用户提供此自定义操作相关信息的 URL。

Required: No

Type: AWS CodePipeline CustomActionType 设置

更新要求替换

Version

此自定义操作的版本号。

Required: No

Type: String

更新要求替换

返回值

Ref

当您将 AWS::CodePipeline::CustomActionType 资源的逻辑 ID 传递给内部函数 Ref 时,此函数返回自定义操作名称,例如 custo-MyCus-A1BCDEFGHIJ2

有关使用 Ref 功能的更多信息,请参阅参考

示例

下面是一个自定义构建操作的示例,它要求用户指定一个属性:项目名称。

JSON

"MyCustomActionType": { "Type": "AWS::CodePipeline::CustomActionType", "Properties": { "Category": "Build", "Provider": "My-Build-Provider-Name", "Version": { "Ref" : "Version" }, "ConfigurationProperties": [ { "Description": "The name of the build project must be provided when this action is added to the pipeline.", "Key": "true", "Name": "MyProjectName", "Queryable": "false", "Required": "true", "Secret": "false", "Type": "String" } ], "InputArtifactDetails": { "MaximumCount": "1", "MinimumCount": "1" }, "OutputArtifactDetails": { "MaximumCount": { "Ref" : "MaximumCountForOutputArtifactDetails" }, "MinimumCount": "0" }, "Settings": { "EntityUrlTemplate": "https://my-build-instance/job/{Config:ProjectName}/", "ExecutionUrlTemplate": "https://my-build-instance/job/{Config:ProjectName}/lastSuccessfulBuild/{ExternalExecutionId}/" } } }

YAML

MyCustomActionType: Type: "AWS::CodePipeline::CustomActionType" Properties: Category: Build Provider: "My-Build-Provider-Name" Version: Ref: Version ConfigurationProperties: - Description: "The name of the build project must be provided when this action is added to the pipeline." Key: true Name: MyProjectName Queryable: false Required: true Secret: false Type: String InputArtifactDetails: MaximumCount: 1 MinimumCount: 1 OutputArtifactDetails: MaximumCount: Ref: MaximumCountForOutputArtifactDetails MinimumCount: 0 Settings: EntityUrlTemplate: "https://my-build-instance/job/{Config:ProjectName}/" ExecutionUrlTemplate: "https://my-build-instance/job/{Config:ProjectName}/lastSuccessfulBuild/{ExternalExecutionId}/"

本页内容: