Experimental
@aws-cdk/aws-imagebuilder-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
ComponentOnFailure Enum
Specifies what the step should do in case of failure.
Example
ts
const component = new imagebuilder.Component(this, 'StructuredComponent', {
platform: imagebuilder.Platform.LINUX,
data: imagebuilder.ComponentData.fromComponentDocumentJsonObject({
schemaVersion: imagebuilder.ComponentSchemaVersion.V1_0,
phases: [
{
name: imagebuilder.ComponentPhaseName.BUILD,
steps: [
{
name: 'install-with-timeout',
action: imagebuilder.ComponentAction.EXECUTE_BASH,
timeout: Duration.minutes(10),
onFailure: imagebuilder.ComponentOnFailure.CONTINUE,
inputs: imagebuilder.ComponentStepInputs.fromObject({
commands: ['./install-script.sh']
})
}
]
}
]
})
});
Members
| Member | Description |
|---|---|
ABORT | Fails the step and document execution. |
CONTINUE | Fails the step and proceeds to execute the next step in the document. |
IGNORE | Ignores the step and proceeds to execute the next step in the document. |
Referenced by
ComponentDocumentStep.onFailureon_failureonFailureOnFailureOnFailure