Class: AWSCDK::CodePipelineActions::ECRBuildAndPublishActionProps
- Inherits:
-
AWSCDK::Codepipeline::CommonAWSActionProps
- Object
- AWSCDK::Codepipeline::CommonAWSActionProps
- AWSCDK::CodePipelineActions::ECRBuildAndPublishActionProps
- Defined in:
- code_pipeline_actions/ecr_build_and_publish_action_props.rb
Overview
Construction properties of the EcrBuildAndPublishAction.
Instance Attribute Summary collapse
-
#action_name ⇒ String
readonly
The physical, human-readable name of the Action.
-
#dockerfile_directory_path ⇒ String?
readonly
The directory path of Dockerfile used to build the image.
-
#image_tags ⇒ Array<String>?
readonly
The tags used for the image.
-
#input ⇒ AWSCDK::Codepipeline::Artifact
readonly
The artifact produced by the source action that contains the Dockerfile needed to build the image.
-
#registry_type ⇒ AWSCDK::CodePipelineActions::RegistryType?
readonly
Specifies whether the repository is public or private.
-
#repository_name ⇒ String
readonly
The name of the ECR repository where the image is pushed.
-
#role ⇒ AWSCDK::IAM::IRole?
readonly
The Role in which context's this Action will be executing in.
-
#run_order ⇒ Numeric?
readonly
The runOrder property for this Action.
-
#variables_namespace ⇒ String?
readonly
The name of the namespace to use for variables emitted by this action.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(action_name:, run_order: nil, variables_namespace: nil, role: nil, input:, repository_name:, dockerfile_directory_path: nil, image_tags: nil, registry_type: nil) ⇒ ECRBuildAndPublishActionProps
constructor
A new instance of ECRBuildAndPublishActionProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(action_name:, run_order: nil, variables_namespace: nil, role: nil, input:, repository_name:, dockerfile_directory_path: nil, image_tags: nil, registry_type: nil) ⇒ ECRBuildAndPublishActionProps
Returns a new instance of ECRBuildAndPublishActionProps.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'code_pipeline_actions/ecr_build_and_publish_action_props.rb', line 16 def initialize(action_name:, run_order: nil, variables_namespace: nil, role: nil, input:, repository_name:, dockerfile_directory_path: nil, image_tags: nil, registry_type: nil) @action_name = action_name Jsii::Type.check_type(@action_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "actionName") @run_order = run_order Jsii::Type.check_type(@run_order, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "runOrder") unless @run_order.nil? @variables_namespace = variables_namespace Jsii::Type.check_type(@variables_namespace, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "variablesNamespace") unless @variables_namespace.nil? @role = role Jsii::Type.check_type(@role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "role") unless @role.nil? @input = input Jsii::Type.check_type(@input, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXBpcGVsaW5lLkFydGlmYWN0In0=")), "input") @repository_name = repository_name Jsii::Type.check_type(@repository_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "repositoryName") @dockerfile_directory_path = dockerfile_directory_path Jsii::Type.check_type(@dockerfile_directory_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "dockerfileDirectoryPath") unless @dockerfile_directory_path.nil? @image_tags = Jsii::Type.check_type(@image_tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "imageTags") unless @image_tags.nil? @registry_type = registry_type Jsii::Type.check_type(@registry_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXBpcGVsaW5lX2FjdGlvbnMuUmVnaXN0cnlUeXBlIn0=")), "registryType") unless @registry_type.nil? end |
Instance Attribute Details
#action_name ⇒ String (readonly)
The physical, human-readable name of the Action.
Note that Action names must be unique within a single Stage.
42 43 44 |
# File 'code_pipeline_actions/ecr_build_and_publish_action_props.rb', line 42 def action_name @action_name end |
#dockerfile_directory_path ⇒ String? (readonly)
Default: - the source repository root level
The directory path of Dockerfile used to build the image.
Optionally, you can provide an alternate directory path if Dockerfile is not at the root level.
81 82 83 |
# File 'code_pipeline_actions/ecr_build_and_publish_action_props.rb', line 81 def dockerfile_directory_path @dockerfile_directory_path end |
#image_tags ⇒ Array<String>? (readonly)
Default: - latest
The tags used for the image.
86 87 88 |
# File 'code_pipeline_actions/ecr_build_and_publish_action_props.rb', line 86 def @image_tags end |
#input ⇒ AWSCDK::Codepipeline::Artifact (readonly)
The artifact produced by the source action that contains the Dockerfile needed to build the image.
70 71 72 |
# File 'code_pipeline_actions/ecr_build_and_publish_action_props.rb', line 70 def input @input end |
#registry_type ⇒ AWSCDK::CodePipelineActions::RegistryType? (readonly)
Default: - RegistryType.PRIVATE
Specifies whether the repository is public or private.
91 92 93 |
# File 'code_pipeline_actions/ecr_build_and_publish_action_props.rb', line 91 def registry_type @registry_type end |
#repository_name ⇒ String (readonly)
The name of the ECR repository where the image is pushed.
74 75 76 |
# File 'code_pipeline_actions/ecr_build_and_publish_action_props.rb', line 74 def repository_name @repository_name end |
#role ⇒ AWSCDK::IAM::IRole? (readonly)
Default: a new Role will be generated
The Role in which context's this Action will be executing in.
The Pipeline's Role will assume this Role
(the required permissions for that will be granted automatically)
right before executing this Action.
This Action will be passed into your IAction.bind
method in the ActionBindOptions.role property.
66 67 68 |
# File 'code_pipeline_actions/ecr_build_and_publish_action_props.rb', line 66 def role @role end |
#run_order ⇒ Numeric? (readonly)
Default: 1
The runOrder property for this Action.
RunOrder determines the relative order in which multiple Actions in the same Stage execute.
50 51 52 |
# File 'code_pipeline_actions/ecr_build_and_publish_action_props.rb', line 50 def run_order @run_order end |
#variables_namespace ⇒ String? (readonly)
Default: - a name will be generated, based on the stage and action names, if any of the action's variables were referenced - otherwise, no namespace will be set
The name of the namespace to use for variables emitted by this action.
55 56 57 |
# File 'code_pipeline_actions/ecr_build_and_publish_action_props.rb', line 55 def variables_namespace @variables_namespace end |
Class Method Details
.jsii_properties ⇒ Object
93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'code_pipeline_actions/ecr_build_and_publish_action_props.rb', line 93 def self.jsii_properties { :action_name => "actionName", :run_order => "runOrder", :variables_namespace => "variablesNamespace", :role => "role", :input => "input", :repository_name => "repositoryName", :dockerfile_directory_path => "dockerfileDirectoryPath", :image_tags => "imageTags", :registry_type => "registryType", } end |
Instance Method Details
#to_jsii ⇒ Object
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'code_pipeline_actions/ecr_build_and_publish_action_props.rb', line 107 def to_jsii result = {} result.merge!(super) result.merge!({ "actionName" => @action_name, "runOrder" => @run_order, "variablesNamespace" => @variables_namespace, "role" => @role, "input" => @input, "repositoryName" => @repository_name, "dockerfileDirectoryPath" => @dockerfile_directory_path, "imageTags" => @image_tags, "registryType" => @registry_type, }) result.compact end |