better-area-51312
06/22/2023, 9:53 AMconst codepipeline = new aws.codepipeline.Pipeline(
process.env.CODE_PIPELINE_NAME!,
{
roleArn: codepipelineRole.arn,
artifactStores: [
{
type: "S3",
location: process.env.CODE_PIPELINE_ARTIFACT_STORE!,
},
],
stages: [
{
name: "Source",
actions: [
{
name: "Source",
category: "Source",
owner: "ThirdParty",
provider: "GitHub",
version: "2",
configuration: {
Owner: process.env.GITHUB_OWNER!,
Repo: process.env.GITHUB_REPOSITORY!, // Replace with your GitHub repo
Branch: "main", // Replace with the branch you want to use
OAuthToken: process.env.GITHUB_PERSONAL_ACCESS_TOKEN!,
},
},
],
},
{
name: "Build",
actions: [
{
name: "Build",
category: "Build",
owner: "AWS",
provider: "CodeBuild",
version: "1",
configuration: {
ProjectName: codeBuildProject.name,
},
},
],
},
{
name: "Deploy",
actions: [
{
name: "Deploy",
category: "Deploy",
owner: "AWS",
provider: "ECS",
inputArtifacts: ["build_output"],
version: "1",
configuration: {
ClusterName: cluster.name,
ServiceName: service.service.name,
FileName: "imagedefinitions.json",
},
},
],
},
],
}
);
calm-queen-58154
06/23/2023, 11:08 AM