Skip to content

Pipeline

Source: src/AWS/CodePipeline/Pipeline.ts

An AWS CodePipeline continuous-delivery pipeline: an ordered set of stages, each running one or more actions (source → build → deploy), with an S3 artifact store carrying outputs between them.

Defining and updating the pipeline is instant. Pipelines that use a git source require a CodeConnections connection whose OAuth handshake is completed manually — use an S3 source to avoid the handshake.

const pipeline = yield* CodePipeline.Pipeline("Release", {
roleArn: role.roleArn,
artifactStore: { type: "S3", location: artifactBucket.bucketName },
stages: [
{
name: "Source",
actions: [{
name: "S3Source",
category: "Source",
owner: "AWS",
provider: "S3",
outputArtifacts: ["SourceOutput"],
configuration: {
S3Bucket: sourceBucket.bucketName,
S3ObjectKey: "source.zip",
PollForSourceChanges: "false",
},
}],
},
{
name: "Build",
actions: [{
name: "Build",
category: "Build",
owner: "AWS",
provider: "CodeBuild",
inputArtifacts: ["SourceOutput"],
configuration: { ProjectName: project.projectName },
}],
},
],
});