Class: AWSCDK::CodePipelineActions::CodeBuildActionProps
- Inherits:
-
AWSCDK::Codepipeline::CommonAWSActionProps
- Object
- AWSCDK::Codepipeline::CommonAWSActionProps
- AWSCDK::CodePipelineActions::CodeBuildActionProps
- Defined in:
- code_pipeline_actions/code_build_action_props.rb
Overview
Construction properties of the CodeBuildAction CodeBuild build CodePipeline action.
Instance Attribute Summary collapse
-
#action_name ⇒ String
readonly
The physical, human-readable name of the Action.
-
#check_secrets_in_plain_text_env_variables ⇒ Boolean?
readonly
Whether to check for the presence of any secrets in the environment variables of the default type, BuildEnvironmentVariableType.PLAINTEXT.
-
#combine_batch_build_artifacts ⇒ Boolean?
readonly
Combine the build artifacts for a batch builds.
-
#environment_variables ⇒ Hash{String => AWSCDK::CodeBuild::BuildEnvironmentVariable}?
readonly
The environment variables to pass to the CodeBuild project when this action executes.
-
#execute_batch_build ⇒ Boolean?
readonly
Trigger a batch build.
-
#extra_inputs ⇒ Array<AWSCDK::Codepipeline::Artifact>?
readonly
The list of additional input Artifacts for this action.
-
#input ⇒ AWSCDK::Codepipeline::Artifact
readonly
The source to use as input for this action.
-
#outputs ⇒ Array<AWSCDK::Codepipeline::Artifact>?
readonly
The list of output Artifacts for this action.
-
#project ⇒ AWSCDK::CodeBuild::IProject
readonly
The action's Project.
-
#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.
-
#type ⇒ AWSCDK::CodePipelineActions::CodeBuildActionType?
readonly
The type of the action that determines its CodePipeline Category - Build, or Test.
-
#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:, project:, check_secrets_in_plain_text_env_variables: nil, combine_batch_build_artifacts: nil, environment_variables: nil, execute_batch_build: nil, extra_inputs: nil, outputs: nil, type: nil) ⇒ CodeBuildActionProps
constructor
A new instance of CodeBuildActionProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(action_name:, run_order: nil, variables_namespace: nil, role: nil, input:, project:, check_secrets_in_plain_text_env_variables: nil, combine_batch_build_artifacts: nil, environment_variables: nil, execute_batch_build: nil, extra_inputs: nil, outputs: nil, type: nil) ⇒ CodeBuildActionProps
Returns a new instance of CodeBuildActionProps.
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'code_pipeline_actions/code_build_action_props.rb', line 20 def initialize(action_name:, run_order: nil, variables_namespace: nil, role: nil, input:, project:, check_secrets_in_plain_text_env_variables: nil, combine_batch_build_artifacts: nil, environment_variables: nil, execute_batch_build: nil, extra_inputs: nil, outputs: nil, 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") @project = project Jsii::Type.check_type(@project, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZWJ1aWxkLklQcm9qZWN0In0=")), "project") @check_secrets_in_plain_text_env_variables = check_secrets_in_plain_text_env_variables Jsii::Type.check_type(@check_secrets_in_plain_text_env_variables, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "checkSecretsInPlainTextEnvVariables") unless @check_secrets_in_plain_text_env_variables.nil? @combine_batch_build_artifacts = combine_batch_build_artifacts Jsii::Type.check_type(@combine_batch_build_artifacts, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "combineBatchBuildArtifacts") unless @combine_batch_build_artifacts.nil? @environment_variables = environment_variables.is_a?(Hash) ? environment_variables.transform_values { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CodeBuild::BuildEnvironmentVariable.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : environment_variables Jsii::Type.check_type(@environment_variables, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2RlYnVpbGQuQnVpbGRFbnZpcm9ubWVudFZhcmlhYmxlIn0sImtpbmQiOiJtYXAifX0=")), "environmentVariables") unless @environment_variables.nil? @execute_batch_build = execute_batch_build Jsii::Type.check_type(@execute_batch_build, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "executeBatchBuild") unless @execute_batch_build.nil? @extra_inputs = extra_inputs Jsii::Type.check_type(@extra_inputs, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2RlcGlwZWxpbmUuQXJ0aWZhY3QifSwia2luZCI6ImFycmF5In19")), "extraInputs") unless @extra_inputs.nil? @outputs = outputs Jsii::Type.check_type(@outputs, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2RlcGlwZWxpbmUuQXJ0aWZhY3QifSwia2luZCI6ImFycmF5In19")), "outputs") unless @outputs.nil? @type = type Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXBpcGVsaW5lX2FjdGlvbnMuQ29kZUJ1aWxkQWN0aW9uVHlwZSJ9")), "type") unless @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.
54 55 56 |
# File 'code_pipeline_actions/code_build_action_props.rb', line 54 def action_name @action_name end |
#check_secrets_in_plain_text_env_variables ⇒ Boolean? (readonly)
Default: true
Whether to check for the presence of any secrets in the environment variables of the default type, BuildEnvironmentVariableType.PLAINTEXT. Since using a secret for the value of that kind of variable would result in it being displayed in plain text in the AWS Console, the construct will throw an exception if it detects a secret was passed there. Pass this property as false if you want to skip this validation, and keep using a secret in a plain text environment variable.
91 92 93 |
# File 'code_pipeline_actions/code_build_action_props.rb', line 91 def check_secrets_in_plain_text_env_variables @check_secrets_in_plain_text_env_variables end |
#combine_batch_build_artifacts ⇒ Boolean? (readonly)
Default: false
Combine the build artifacts for a batch builds.
Enabling this will combine the build artifacts into the same location for batch builds.
If execute_batch_build is not set to true, this property is ignored.
99 100 101 |
# File 'code_pipeline_actions/code_build_action_props.rb', line 99 def combine_batch_build_artifacts @combine_batch_build_artifacts end |
#environment_variables ⇒ Hash{String => AWSCDK::CodeBuild::BuildEnvironmentVariable}? (readonly)
Default: - No additional environment variables are specified.
The environment variables to pass to the CodeBuild project when this action executes.
If a variable with the same name was set both on the project level, and here, this value will take precedence.
107 108 109 |
# File 'code_pipeline_actions/code_build_action_props.rb', line 107 def environment_variables @environment_variables end |
#execute_batch_build ⇒ Boolean? (readonly)
Default: false
Trigger a batch build.
Enabling this will enable batch builds on the CodeBuild project.
114 115 116 |
# File 'code_pipeline_actions/code_build_action_props.rb', line 114 def execute_batch_build @execute_batch_build end |
#extra_inputs ⇒ Array<AWSCDK::Codepipeline::Artifact>? (readonly)
The list of additional input Artifacts for this action.
The directories the additional inputs will be available at are available
during the project's build in the CODEBUILD_SRC_DIR_input property.
For more information,
see https://docs.aws.amazon.com/codebuild/latest/userguide/sample-multi-in-out.html .
125 126 127 |
# File 'code_pipeline_actions/code_build_action_props.rb', line 125 def extra_inputs @extra_inputs end |
#input ⇒ AWSCDK::Codepipeline::Artifact (readonly)
The source to use as input for this action.
82 83 84 |
# File 'code_pipeline_actions/code_build_action_props.rb', line 82 def input @input end |
#outputs ⇒ Array<AWSCDK::Codepipeline::Artifact>? (readonly)
Default: the action will not have any outputs
The list of output Artifacts for this action.
Note: if you specify more than one output Artifact here, you cannot use the primary 'artifacts' section of the buildspec; you have to use the 'secondary-artifacts' section instead. See https://docs.aws.amazon.com/codebuild/latest/userguide/sample-multi-in-out.html for details.
136 137 138 |
# File 'code_pipeline_actions/code_build_action_props.rb', line 136 def outputs @outputs end |
#project ⇒ AWSCDK::CodeBuild::IProject (readonly)
The action's Project.
86 87 88 |
# File 'code_pipeline_actions/code_build_action_props.rb', line 86 def project @project 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.
78 79 80 |
# File 'code_pipeline_actions/code_build_action_props.rb', line 78 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.
62 63 64 |
# File 'code_pipeline_actions/code_build_action_props.rb', line 62 def run_order @run_order end |
#type ⇒ AWSCDK::CodePipelineActions::CodeBuildActionType? (readonly)
Default: CodeBuildActionType.BUILD
The type of the action that determines its CodePipeline Category - Build, or Test.
141 142 143 |
# File 'code_pipeline_actions/code_build_action_props.rb', line 141 def type @type 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.
67 68 69 |
# File 'code_pipeline_actions/code_build_action_props.rb', line 67 def variables_namespace @variables_namespace end |
Class Method Details
.jsii_properties ⇒ Object
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
# File 'code_pipeline_actions/code_build_action_props.rb', line 143 def self.jsii_properties { :action_name => "actionName", :run_order => "runOrder", :variables_namespace => "variablesNamespace", :role => "role", :input => "input", :project => "project", :check_secrets_in_plain_text_env_variables => "checkSecretsInPlainTextEnvVariables", :combine_batch_build_artifacts => "combineBatchBuildArtifacts", :environment_variables => "environmentVariables", :execute_batch_build => "executeBatchBuild", :extra_inputs => "extraInputs", :outputs => "outputs", :type => "type", } end |
Instance Method Details
#to_jsii ⇒ Object
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 |
# File 'code_pipeline_actions/code_build_action_props.rb', line 161 def to_jsii result = {} result.merge!(super) result.merge!({ "actionName" => @action_name, "runOrder" => @run_order, "variablesNamespace" => @variables_namespace, "role" => @role, "input" => @input, "project" => @project, "checkSecretsInPlainTextEnvVariables" => @check_secrets_in_plain_text_env_variables, "combineBatchBuildArtifacts" => @combine_batch_build_artifacts, "environmentVariables" => @environment_variables, "executeBatchBuild" => @execute_batch_build, "extraInputs" => @extra_inputs, "outputs" => @outputs, "type" => @type, }) result.compact end |