Class: AWSCDK::CodeDeploy::CfnDeploymentGroup::DeploymentProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CodeDeploy::CfnDeploymentGroup::DeploymentProperty
- Defined in:
- code_deploy/cfn_deployment_group.rb
Overview
Deployment is a property of the DeploymentGroup resource that specifies an AWS CodeDeploy application revision to be deployed to instances in the deployment group. If you specify an application revision, your target revision is deployed as soon as the provisioning process is complete.
Instance Attribute Summary collapse
-
#description ⇒ String?
readonly
A comment about the deployment.
-
#ignore_application_stop_failures ⇒ Boolean, ...
readonly
If true, then if an
ApplicationStop,BeforeBlockTraffic, orAfterBlockTrafficdeployment lifecycle event to an instance fails, then the deployment continues to the next deployment lifecycle event. -
#revision ⇒ AWSCDK::IResolvable, AWSCDK::CodeDeploy::CfnDeploymentGroup::RevisionLocationProperty
readonly
Information about the location of stored application artifacts and the service from which to retrieve them.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(revision:, description: nil, ignore_application_stop_failures: nil) ⇒ DeploymentProperty
constructor
A new instance of DeploymentProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(revision:, description: nil, ignore_application_stop_failures: nil) ⇒ DeploymentProperty
Returns a new instance of DeploymentProperty.
1016 1017 1018 1019 1020 1021 1022 1023 |
# File 'code_deploy/cfn_deployment_group.rb', line 1016 def initialize(revision:, description: nil, ignore_application_stop_failures: nil) @revision = revision.is_a?(Hash) ? ::AWSCDK::CodeDeploy::CfnDeploymentGroup::RevisionLocationProperty.new(**revision.transform_keys(&:to_sym)) : revision Jsii::Type.check_type(@revision, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2RlZGVwbG95LkNmbkRlcGxveW1lbnRHcm91cC5SZXZpc2lvbkxvY2F0aW9uUHJvcGVydHkifV19fQ==")), "revision") @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil? @ignore_application_stop_failures = ignore_application_stop_failures Jsii::Type.check_type(@ignore_application_stop_failures, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "ignoreApplicationStopFailures") unless @ignore_application_stop_failures.nil? end |
Instance Attribute Details
#description ⇒ String? (readonly)
A comment about the deployment.
1034 1035 1036 |
# File 'code_deploy/cfn_deployment_group.rb', line 1034 def description @description end |
#ignore_application_stop_failures ⇒ Boolean, ... (readonly)
If true, then if an ApplicationStop , BeforeBlockTraffic , or AfterBlockTraffic deployment lifecycle event to an instance fails, then the deployment continues to the next deployment lifecycle event.
For example, if ApplicationStop fails, the deployment continues with DownloadBundle. If BeforeBlockTraffic fails, the deployment continues with BlockTraffic . If AfterBlockTraffic fails, the deployment continues with ApplicationStop .
If false or not specified, then if a lifecycle event fails during a deployment to an instance, that deployment fails. If deployment to that instance is part of an overall deployment and the number of healthy hosts is not less than the minimum number of healthy hosts, then a deployment to the next instance is attempted.
During a deployment, the AWS CodeDeploy agent runs the scripts specified for ApplicationStop , BeforeBlockTraffic , and AfterBlockTraffic in the AppSpec file from the previous successful deployment. (All other scripts are run from the AppSpec file in the current deployment.) If one of these scripts contains an error and does not run successfully, the deployment can fail.
If the cause of the failure is a script from the last successful deployment that will never run successfully, create a new deployment and use ignore_application_stop_failures to specify that the ApplicationStop , BeforeBlockTraffic , and AfterBlockTraffic failures should be ignored.
1047 1048 1049 |
# File 'code_deploy/cfn_deployment_group.rb', line 1047 def ignore_application_stop_failures @ignore_application_stop_failures end |
#revision ⇒ AWSCDK::IResolvable, AWSCDK::CodeDeploy::CfnDeploymentGroup::RevisionLocationProperty (readonly)
Information about the location of stored application artifacts and the service from which to retrieve them.
1029 1030 1031 |
# File 'code_deploy/cfn_deployment_group.rb', line 1029 def revision @revision end |
Class Method Details
.jsii_properties ⇒ Object
1049 1050 1051 1052 1053 1054 1055 |
# File 'code_deploy/cfn_deployment_group.rb', line 1049 def self.jsii_properties { :revision => "revision", :description => "description", :ignore_application_stop_failures => "ignoreApplicationStopFailures", } end |
Instance Method Details
#to_jsii ⇒ Object
1057 1058 1059 1060 1061 1062 1063 1064 1065 |
# File 'code_deploy/cfn_deployment_group.rb', line 1057 def to_jsii result = {} result.merge!({ "revision" => @revision, "description" => @description, "ignoreApplicationStopFailures" => @ignore_application_stop_failures, }) result.compact end |