Class PDKPipeline
- java.lang.Object
-
- software.amazon.jsii.JsiiObject
-
- software.constructs.Construct
-
- software.aws.awsprototypingsdk.pipeline.PDKPipeline
-
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.82.0 (build 2d2ddd7)", date="2023-08-02T01:26:23.808Z") @Stability(Stable) public class PDKPipeline extends software.constructs.Construct
An extension to CodePipeline which configures sane defaults for a NX Monorepo codebase.In addition to this, it also creates a CodeCommit repository with automated PR builds and approvals.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPDKPipeline.BuilderA fluent builder forPDKPipeline.
-
Field Summary
Fields Modifier and Type Field Description static List<String>ALL_BRANCHESstatic StringDEFAULT_BRANCH_NAME
-
Constructor Summary
Constructors Modifier Constructor Description protectedPDKPipeline(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)protectedPDKPipeline(software.amazon.jsii.JsiiObjectRef objRef)PDKPipeline(software.constructs.Construct scope, String id, PDKPipelineProps props)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description software.amazon.awscdk.pipelines.StageDeploymentaddStage(software.amazon.awscdk.Stage stage)software.amazon.awscdk.pipelines.StageDeploymentaddStage(software.amazon.awscdk.Stage stage, software.amazon.awscdk.pipelines.AddStageOpts options)voidbuildPipeline()static StringgetBranchPrefix()A helper function to create a branch prefix.static StringgetBranchPrefix(IsDefaultBranchProps props)A helper function to create a branch prefix.software.amazon.awscdk.pipelines.CodePipelinegetCodePipeline()software.amazon.awscdk.services.codecommit.IRepositorygetCodeRepository()static BooleanisDefaultBranch()A helper function to determine if the current branch is the default branch.static BooleanisDefaultBranch(IsDefaultBranchProps props)A helper function to determine if the current branch is the default branch.static StringnormalizeBranchName(String branchName)A helper function to normalize the branch name with only alphanumeric characters and hypens ('-').voidsuppressCDKViolations()-
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
-
-
-
-
Constructor Detail
-
PDKPipeline
protected PDKPipeline(software.amazon.jsii.JsiiObjectRef objRef)
-
PDKPipeline
protected PDKPipeline(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
PDKPipeline
@Stability(Stable) public PDKPipeline(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull PDKPipelineProps props)- Parameters:
scope- This parameter is required.id- This parameter is required.props- This parameter is required.
-
-
Method Detail
-
getBranchPrefix
@Stability(Stable) @NotNull public static String getBranchPrefix(@Nullable IsDefaultBranchProps props)
A helper function to create a branch prefix.The prefix is empty on the default branch.
- Parameters:
props- ? { defaultBranchName? Specify the default branch name without context. node? The current app to fetch defaultBranchName from context. }.- Returns:
- The branch prefix.
-
getBranchPrefix
@Stability(Stable) @NotNull public static String getBranchPrefix()
A helper function to create a branch prefix.The prefix is empty on the default branch.
- Returns:
- The branch prefix.
-
isDefaultBranch
@Stability(Stable) @NotNull public static Boolean isDefaultBranch(@Nullable IsDefaultBranchProps props)
A helper function to determine if the current branch is the default branch.If there is no BRANCH environment variable, then assume this is the default branch. Otherwise, check that BRANCH matches the default branch name.
The default branch name is determined in the following priority:
- defaultBranchName property
- defaultBranchName context
- PDKPipeline.defaultBranchName constant
- Parameters:
props- ? { defaultBranchName? Specify the default branch name without context. node? The current app to fetch defaultBranchName from context. }.- Returns:
- True if the current branch is the default branch.
-
isDefaultBranch
@Stability(Stable) @NotNull public static Boolean isDefaultBranch()
A helper function to determine if the current branch is the default branch.If there is no BRANCH environment variable, then assume this is the default branch. Otherwise, check that BRANCH matches the default branch name.
The default branch name is determined in the following priority:
- defaultBranchName property
- defaultBranchName context
- PDKPipeline.defaultBranchName constant
- Returns:
- True if the current branch is the default branch.
-
normalizeBranchName
@Stability(Stable) @NotNull public static String normalizeBranchName(@NotNull String branchName)
A helper function to normalize the branch name with only alphanumeric characters and hypens ('-').- Parameters:
branchName- The name of the branch to normalize. This parameter is required.- Returns:
- The normalized branch name.
-
addStage
@Stability(Stable) @NotNull public software.amazon.awscdk.pipelines.StageDeployment addStage(@NotNull software.amazon.awscdk.Stage stage, @Nullable software.amazon.awscdk.pipelines.AddStageOpts options)- Parameters:
stage- This parameter is required.options-
-
addStage
@Stability(Stable) @NotNull public software.amazon.awscdk.pipelines.StageDeployment addStage(@NotNull software.amazon.awscdk.Stage stage)- Parameters:
stage- This parameter is required.
-
buildPipeline
@Stability(Stable) public void buildPipeline()
-
suppressCDKViolations
@Stability(Stable) public void suppressCDKViolations()
-
getCodePipeline
@Stability(Stable) @NotNull public software.amazon.awscdk.pipelines.CodePipeline getCodePipeline()
-
getCodeRepository
@Stability(Stable) @NotNull public software.amazon.awscdk.services.codecommit.IRepository getCodeRepository()
-
-