Interface EcrBuildAndPublishActionProps
- All Superinterfaces:
CommonActionProps,CommonAwsActionProps,software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
EcrBuildAndPublishActionProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.121.0 (build d7af9b9)",
date="2025-12-18T18:20:07.286Z")
@Stability(Stable)
public interface EcrBuildAndPublishActionProps
extends software.amazon.jsii.JsiiSerializable, CommonAwsActionProps
Construction properties of the
EcrBuildAndPublishAction.
Example:
import software.amazon.awscdk.services.ecr.*;
Pipeline pipeline;
IRepository repository;
Artifact sourceOutput = new Artifact();
// your source repository
CodeStarConnectionsSourceAction sourceAction = CodeStarConnectionsSourceAction.Builder.create()
.actionName("CodeStarConnectionsSourceAction")
.output(sourceOutput)
.connectionArn("your-connection-arn")
.owner("your-owner")
.repo("your-repo")
.build();
EcrBuildAndPublishAction buildAction = EcrBuildAndPublishAction.Builder.create()
.actionName("EcrBuildAndPublishAction")
.repositoryName(repository.getRepositoryName())
.registryType(RegistryType.PRIVATE)
.dockerfileDirectoryPath("./my-dir") // The path indicates ./my-dir/Dockerfile in the source repository
.imageTags(List.of("my-tag-1", "my-tag-2"))
.input(sourceOutput)
.build();
pipeline.addStage(StageOptions.builder()
.stageName("Source")
.actions(List.of(sourceAction))
.build());
pipeline.addStage(StageOptions.builder()
.stageName("Build")
.actions(List.of(buildAction))
.build());
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forEcrBuildAndPublishActionPropsstatic final classAn implementation forEcrBuildAndPublishActionProps -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default StringThe directory path of Dockerfile used to build the image.The tags used for the image.getInput()The artifact produced by the source action that contains the Dockerfile needed to build the image.default RegistryTypeSpecifies whether the repository is public or private.The name of the ECR repository where the image is pushed.Methods inherited from interface software.amazon.awscdk.services.codepipeline.CommonActionProps
getActionName, getRunOrder, getVariablesNamespaceMethods inherited from interface software.amazon.awscdk.services.codepipeline.CommonAwsActionProps
getRoleMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getInput
The artifact produced by the source action that contains the Dockerfile needed to build the image. -
getRepositoryName
The name of the ECR repository where the image is pushed. -
getDockerfileDirectoryPath
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.
Default: - the source repository root level
-
getImageTags
The tags used for the image.Default: - latest
-
getRegistryType
Specifies whether the repository is public or private.Default: - RegistryType.PRIVATE
-
builder
-