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
SelfMutationEnabled
Whether SelfMutation is enabled for this CDK Pipeline.
public virtual bool SelfMutationEnabled { get; }
Property Value
SelfMutationProject
The CodeBuild project that performs the SelfMutation.
public virtual IProject SelfMutationProject { get; }
Property Value
SynthProject
The CodeBuild project that performs the Synth.
public virtual IProject SynthProject { get; }
Property Value
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
Methods
DoBuildPipeline()
Implemented by subclasses to do the actual pipeline construction.
protected override void DoBuildPipeline()