Skip to content

Latest commit

 

History

History
688 lines (339 loc) · 24.6 KB

API.md

File metadata and controls

688 lines (339 loc) · 24.6 KB

API Reference

Classes

Name Description
AdditionalTrigger Convenience class to create additional trigger {CodePipelineMixin}s for executing a CodePipeline if certain events occur other than a code change.
BuildProjectFeature No description
BuildSpecPipeline No description
CleanupStacksMixin No description
CodeArtifactFeature No description
CodePipelineMixin No description
DeploymentTargetsSource No description
MultiDeployCodePipeline No description
NoopStackFactory No description
SSMParametersFeature No description
StackFactoryApplicationStage No description
SynthCommands No description
SynthProfiles No description

Structs

Name Description
BuildSpecPipelineProps No description
CodeArtifactFeatureProps No description
DeploymentStage No description
DeploymentTarget No description
MultiDeployCodePipelineProps No description

Interfaces

Name Description
IDeploymentTargetsProvider No description
IStackFactory No description

class AdditionalTrigger

Convenience class to create additional trigger {CodePipelineMixin}s for executing a CodePipeline if certain events occur other than a code change.

Initializer

new AdditionalTrigger()

Methods

static schedule(schedule)

Create an additional trigger {CodePipelineMixin} based on a schedule.

static schedule(schedule: Schedule): CodePipelineMixin

Returns:

static ssmParameterChange(...parameterNames)

Create an additional trigger {CodePipelineMixin} for a SSM parameter value change.

static ssmParameterChange(...parameterNames: string[]): CodePipelineMixin
  • parameterNames (string) No description

Returns:

class BuildProjectFeature

Initializer

new BuildProjectFeature()

Properties

Name Type Description
policyStatements Array<aws_iam.PolicyStatement>
postBuildCommands Array
preBuildCommands Array

class BuildSpecPipeline

Implements: IConstruct, IDependable Extends: Construct

Initializer

new BuildSpecPipeline(scope: Construct, name: string, props?: BuildSpecPipelineProps)
  • scope (Construct) No description
  • name (string) No description
  • props (BuildSpecPipelineProps) No description
    • branch (string) No description Optional
    • buildEnvironment (aws_codebuild.BuildEnvironment) No description Optional
    • buildSpec (Map<string, any>) No description Optional
    • buildSpecFile (string) No description Optional
    • existingRepositoryObj (aws_codecommit.Repository) No description Optional
    • projectDescription (string) No description Optional
    • projectName (string) No description Optional
    • repositoryProps (aws_codecommit.RepositoryProps) No description Optional
    • retainRepository (boolean) No description Optional

Properties

Name Type Description
buildSpec Map<string, any>
codebuildProject aws_codebuild.PipelineProject
features Array<BuildProjectFeature>
pipeline aws_codepipeline.Pipeline
props BuildSpecPipelineProps
repository aws_codecommit.Repository

class CleanupStacksMixin

Extends: CodePipelineMixin

Initializer

new CleanupStacksMixin(skipDeletion?: boolean, qualifier?: string)
  • skipDeletion (boolean) No description
  • qualifier (string) No description

Methods

preDoBuildPipeline(_codePipeline)

preDoBuildPipeline(_codePipeline: CodePipeline): void

class CodeArtifactFeature

Extends: BuildProjectFeature

Initializer

new CodeArtifactFeature(pipeline: BuildSpecPipeline)

class CodePipelineMixin

Implemented by: CleanupStacksMixin Obtainable from: AdditionalTrigger.schedule(), AdditionalTrigger.ssmParameterChange()

Initializer

new CodePipelineMixin()

Methods

postDoBuildPipeline(_codePipeline)

postDoBuildPipeline(_codePipeline: CodePipeline): void

preDoBuildPipeline(_codePipeline)

preDoBuildPipeline(_codePipeline: CodePipeline): void

class DeploymentTargetsSource

Initializer

new DeploymentTargetsSource()

Methods

static ssmParameter(name)

static ssmParameter(name: string): IDeploymentTargetsProvider
  • name (string) No description

Returns:

static staticValue(targets)

static staticValue(targets: Array<DeploymentTarget>): IDeploymentTargetsProvider

Returns:

class MultiDeployCodePipeline

Implements: IConstruct, IDependable Extends: pipelines.CodePipeline

Initializer

new MultiDeployCodePipeline(scope: Construct, id: string, props: MultiDeployCodePipelineProps)
  • scope (Construct) No description
  • id (string) No description
  • props (MultiDeployCodePipelineProps) No description
    • synth (pipelines.IFileSetProducer) The build step that produces the CDK Cloud Assembly.
    • artifactBucket (aws_s3.IBucket) An existing S3 Bucket to use for storing the pipeline's artifact. Default: A new S3 bucket will be created.
    • assetPublishingCodeBuildDefaults (pipelines.CodeBuildOptions) Additional customizations to apply to the asset publishing CodeBuild projects. Default: Only codeBuildDefaults are applied
    • cliVersion (string) CDK CLI version to use in self-mutation and asset publishing steps. Default: Latest version
    • codeBuildDefaults (pipelines.CodeBuildOptions) Customize the CodeBuild projects created for this pipeline. Default: All projects run non-privileged build, SMALL instance, LinuxBuildImage.STANDARD_7_0
    • codePipeline (aws_codepipeline.Pipeline) An existing Pipeline to be reused and built upon. Default: a new underlying pipeline is created.
    • crossAccountKeys (boolean) Create KMS keys for the artifact buckets, allowing cross-account deployments. Default: false
    • dockerCredentials (Array<pipelines.DockerCredential>) A list of credentials used to authenticate to Docker registries. Default: []
    • dockerEnabledForSelfMutation (boolean) Enable Docker for the self-mutate step. Default: false
    • dockerEnabledForSynth (boolean) Enable Docker for the 'synth' step. Default: false
    • enableKeyRotation (boolean) Enable KMS key rotation for the generated KMS keys. Default: false (key rotation is disabled)
    • pipelineName (string) The name of the CodePipeline pipeline. Default: Automatically generated
    • publishAssetsInParallel (boolean) Publish assets in multiple CodeBuild projects. Default: true
    • reuseCrossRegionSupportStacks (boolean) Reuse the same cross region support stack for all pipelines in the App. Default: true (Use the same support stack for all pipelines in App)
    • role (aws_iam.IRole) The IAM role to be assumed by this Pipeline. Default: A new role is created
    • selfMutation (boolean) Whether the pipeline will update itself. Default: true
    • selfMutationCodeBuildDefaults (pipelines.CodeBuildOptions) Additional customizations to apply to the self mutation CodeBuild projects. Default: Only codeBuildDefaults are applied
    • synthCodeBuildDefaults (pipelines.CodeBuildOptions) Additional customizations to apply to the synthesize CodeBuild projects. Default: Only codeBuildDefaults are applied
    • useChangeSets (boolean) Deploy every stack by creating a change set and executing it. Default: true
    • deploymentStages (Array<DeploymentStage>) No description
    • crossRegionReplicationBuckets (Map<string, aws_s3.IBucket>) No description Optional
    • mixins (Array<CodePipelineMixin>) No description Optional
    • restartExecutionOnUpdate (boolean) No description Optional
    • stackFactory (IStackFactory) No description Optional

Properties

Name Type Description
mdcProps MultiDeployCodePipelineProps
stacks Array<Stack>

Methods

protected doBuildPipeline()

Implemented by subclasses to do the actual pipeline construction.

protected doBuildPipeline(): void

class NoopStackFactory

Implements: IStackFactory

Initializer

new NoopStackFactory()

Methods

create(scope, env)

create(scope: Construct, env: Environment): Stack
  • scope (Construct) No description
  • env (Environment) No description
    • account (string) The AWS account ID for this environment. Default: Aws.ACCOUNT_ID which means that the stack will be account-agnostic.
    • region (string) The AWS region for this environment. Default: Aws.REGION which means that the stack will be region-agnostic.

Returns:

class SSMParametersFeature

Extends: BuildProjectFeature

Initializer

new SSMParametersFeature(pipeline: BuildSpecPipeline)

class StackFactoryApplicationStage

Implements: IConstruct, IDependable Extends: Stage

Initializer

new StackFactoryApplicationStage(scope: Construct, id: string, props: StageProps, stackFactory: IStackFactory)

Properties

Name Type Description
stack Stack

class SynthCommands

Initializer

new SynthCommands()

Properties

Name Type Description
static projenCdkApp Array

class SynthProfiles

Initializer

new SynthProfiles()

Methods

static projenCdkApp(input?)

static projenCdkApp(input?: IFileSetProducer): IFileSetProducer

Returns:

struct BuildSpecPipelineProps

Name Type Description
branch? string Optional
buildEnvironment? aws_codebuild.BuildEnvironment Optional
buildSpec? Map<string, any> Optional
buildSpecFile? string Optional
existingRepositoryObj? aws_codecommit.Repository Optional
projectDescription? string Optional
projectName? string Optional
repositoryProps? aws_codecommit.RepositoryProps Optional
retainRepository? boolean Optional

struct CodeArtifactFeatureProps

Name Type Description
domain string
repos Map<string, string>

struct DeploymentStage

Name Type Description
name string
targets IDeploymentTargetsProvider
post? Array<pipelines.Step> Optional
pre? Array<pipelines.Step> Optional
requireManualApproval? boolean Optional
stackFactory? IStackFactory Optional

struct DeploymentTarget

Name Type Description
account string
region string
name? string Optional

interface IDeploymentTargetsProvider

Obtainable from: DeploymentTargetsSource.ssmParameter(), DeploymentTargetsSource.staticValue()

Methods

provide(scope)

provide(scope: Construct): Array<DeploymentTarget>

Returns:

interface IStackFactory

Implemented by: NoopStackFactory

Methods

create(scope, env)

create(scope: Construct, env: Environment): Stack
  • scope (Construct) No description
  • env (Environment) No description
    • account (string) The AWS account ID for this environment. Default: Aws.ACCOUNT_ID which means that the stack will be account-agnostic.
    • region (string) The AWS region for this environment. Default: Aws.REGION which means that the stack will be region-agnostic.

Returns:

struct MultiDeployCodePipelineProps

Name Type Description
deploymentStages Array<DeploymentStage>
synth pipelines.IFileSetProducer The build step that produces the CDK Cloud Assembly.
artifactBucket? aws_s3.IBucket An existing S3 Bucket to use for storing the pipeline's artifact.
Default: A new S3 bucket will be created.
assetPublishingCodeBuildDefaults? pipelines.CodeBuildOptions Additional customizations to apply to the asset publishing CodeBuild projects.
Default: Only codeBuildDefaults are applied
cliVersion? string CDK CLI version to use in self-mutation and asset publishing steps.
Default: Latest version
codeBuildDefaults? pipelines.CodeBuildOptions Customize the CodeBuild projects created for this pipeline.
Default: All projects run non-privileged build, SMALL instance, LinuxBuildImage.STANDARD_7_0
codePipeline? aws_codepipeline.Pipeline An existing Pipeline to be reused and built upon.
Default: a new underlying pipeline is created.
crossAccountKeys? boolean Create KMS keys for the artifact buckets, allowing cross-account deployments.
Default: false
crossRegionReplicationBuckets? Map<string, aws_s3.IBucket> Optional
dockerCredentials? Array<pipelines.DockerCredential> A list of credentials used to authenticate to Docker registries.
Default: []
dockerEnabledForSelfMutation? boolean Enable Docker for the self-mutate step.
Default: false
dockerEnabledForSynth? boolean Enable Docker for the 'synth' step.
Default: false
enableKeyRotation? boolean Enable KMS key rotation for the generated KMS keys.
Default: false (key rotation is disabled)
mixins? Array<CodePipelineMixin> Optional
pipelineName? string The name of the CodePipeline pipeline.
Default: Automatically generated
publishAssetsInParallel? boolean Publish assets in multiple CodeBuild projects.
Default: true
restartExecutionOnUpdate? boolean Optional
reuseCrossRegionSupportStacks? boolean Reuse the same cross region support stack for all pipelines in the App.
Default: true (Use the same support stack for all pipelines in App)
role? aws_iam.IRole The IAM role to be assumed by this Pipeline.
Default: A new role is created
selfMutation? boolean Whether the pipeline will update itself.
Default: true
selfMutationCodeBuildDefaults? pipelines.CodeBuildOptions Additional customizations to apply to the self mutation CodeBuild projects.
Default: Only codeBuildDefaults are applied
stackFactory? IStackFactory Optional
synthCodeBuildDefaults? pipelines.CodeBuildOptions Additional customizations to apply to the synthesize CodeBuild projects.
Default: Only codeBuildDefaults are applied
useChangeSets? boolean Deploy every stack by creating a change set and executing it.
Default: true