Class 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 class  PDKPipeline.Builder
      A fluent builder for PDKPipeline.
      • Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

        software.amazon.jsii.JsiiObject.InitializationMode
      • Nested classes/interfaces inherited from interface software.constructs.IConstruct

        software.constructs.IConstruct.Jsii$Default, software.constructs.IConstruct.Jsii$Proxy
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected PDKPipeline​(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)  
      protected PDKPipeline​(software.amazon.jsii.JsiiObjectRef objRef)  
        PDKPipeline​(software.constructs.Construct scope, String id, PDKPipelineProps props)  
    • Field Detail

      • ALL_BRANCHES

        @Stability(Stable)
        public static final List<String> ALL_BRANCHES
      • DEFAULT_BRANCH_NAME

        @Stability(Stable)
        public static final String DEFAULT_BRANCH_NAME
    • 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:

        1. defaultBranchName property
        2. defaultBranchName context
        3. 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:

        1. defaultBranchName property
        2. defaultBranchName context
        3. 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()