Class CodePipeline

A CDK Pipeline that uses CodePipeline to deploy CDK apps.

Inherited Members
Namespace: Amazon.CDK.Pipelines
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CodePipeline : PipelineBase
Syntax (vb)
Public Class CodePipeline Inherits PipelineBase
Examples
Pipeline codePipeline;


             var sourceArtifact = new Artifact("MySourceArtifact");

             var pipeline = new CodePipeline(this, "Pipeline", new CodePipelineProps {
                 CodePipeline = codePipeline,
                 Synth = new ShellStep("Synth", new ShellStepProps {
                     Input = CodePipelineFileSet.FromArtifact(sourceArtifact),
                     Commands = new [] { "npm ci", "npm run build", "npx cdk synth" }
                 })
             });

Synopsis

Constructors

Properties

Pipeline

The CodePipeline pipeline that deploys the CDK app.

SelfMutationEnabled

Whether SelfMutation is enabled for this CDK Pipeline.

SelfMutationProject

The CodeBuild project that performs the SelfMutation.

SynthProject

The CodeBuild project that performs the Synth.

UsePipelineRoleForActions

Allow pipeline service role used for actions if no action role configured instead of creating a new role for each action.

Methods

Constructors

CodePipeline(Construct, string, ICodePipelineProps)

A CDK Pipeline that uses CodePipeline to deploy CDK apps.

public CodePipeline(Construct scope, string id, ICodePipelineProps props)
Parameters
scope Construct
id string
props ICodePipelineProps
Examples
Pipeline codePipeline;


             var sourceArtifact = new Artifact("MySourceArtifact");

             var pipeline = new CodePipeline(this, "Pipeline", new CodePipelineProps {
                 CodePipeline = codePipeline,
                 Synth = new ShellStep("Synth", new ShellStepProps {
                     Input = CodePipelineFileSet.FromArtifact(sourceArtifact),
                     Commands = new [] { "npm ci", "npm run build", "npx cdk synth" }
                 })
             });

Properties

Pipeline

The CodePipeline pipeline that deploys the CDK app.

public virtual Pipeline Pipeline { get; }
Property Value

Pipeline

SelfMutationEnabled

Whether SelfMutation is enabled for this CDK Pipeline.

public virtual bool SelfMutationEnabled { get; }
Property Value

bool

SelfMutationProject

The CodeBuild project that performs the SelfMutation.

public virtual IProject SelfMutationProject { get; }
Property Value

IProject

SynthProject

The CodeBuild project that performs the Synth.

public virtual IProject SynthProject { get; }
Property Value

IProject

UsePipelineRoleForActions

Allow pipeline service role used for actions if no action role configured instead of creating a new role for each action.

public virtual bool UsePipelineRoleForActions { get; }
Property Value

bool

Methods

DoBuildPipeline()

Implemented by subclasses to do the actual pipeline construction.

protected override void DoBuildPipeline()
Overrides