Remove CodePipeline files
Deploys now run via GitHub Actions (cd-cdk.yaml). The CodePipeline stack and its IAM roles have been deleted from AWS.
This commit is contained in:
parent
3f03274708
commit
0d44c95287
2 changed files with 0 additions and 199 deletions
|
|
@ -1,11 +0,0 @@
|
||||||
version: 0.2
|
|
||||||
|
|
||||||
phases:
|
|
||||||
install:
|
|
||||||
runtime-versions:
|
|
||||||
nodejs: 22
|
|
||||||
commands:
|
|
||||||
- npm ci
|
|
||||||
build:
|
|
||||||
commands:
|
|
||||||
- npx cdk deploy --require-approval never
|
|
||||||
188
pipeline.yaml
188
pipeline.yaml
|
|
@ -1,188 +0,0 @@
|
||||||
AWSTemplateFormatVersion: "2010-09-09"
|
|
||||||
Description: CI/CD pipeline — CodePipeline + CodeBuild for CDK deployments
|
|
||||||
|
|
||||||
Parameters:
|
|
||||||
GitHubOwner:
|
|
||||||
Type: String
|
|
||||||
Default: Sea-Haven-Industries
|
|
||||||
GitHubRepo:
|
|
||||||
Type: String
|
|
||||||
Default: exec-aide
|
|
||||||
GitHubBranch:
|
|
||||||
Type: String
|
|
||||||
Default: main
|
|
||||||
ConnectionArn:
|
|
||||||
Type: String
|
|
||||||
Description: CodeConnections ARN for GitHub
|
|
||||||
Default: arn:aws:codeconnections:us-east-1:328440206208:connection/52bc9d0e-1088-43bc-9394-2c513ed10bc6
|
|
||||||
|
|
||||||
Resources:
|
|
||||||
ArtifactBucket:
|
|
||||||
Type: AWS::S3::Bucket
|
|
||||||
Properties:
|
|
||||||
BucketName: exec-aide-pipeline-artifacts
|
|
||||||
LifecycleConfiguration:
|
|
||||||
Rules:
|
|
||||||
- Id: expire-artifacts
|
|
||||||
Status: Enabled
|
|
||||||
ExpirationInDays: 30
|
|
||||||
Tags:
|
|
||||||
- Key: Purpose
|
|
||||||
Value: pipeline-artifacts
|
|
||||||
- Key: ManagedBy
|
|
||||||
Value: !Ref AWS::StackName
|
|
||||||
|
|
||||||
CodeBuildRole:
|
|
||||||
Type: AWS::IAM::Role
|
|
||||||
Properties:
|
|
||||||
RoleName: exec-aide-codebuild
|
|
||||||
AssumeRolePolicyDocument:
|
|
||||||
Version: "2012-10-17"
|
|
||||||
Statement:
|
|
||||||
- Effect: Allow
|
|
||||||
Principal:
|
|
||||||
Service: codebuild.amazonaws.com
|
|
||||||
Action: sts:AssumeRole
|
|
||||||
Policies:
|
|
||||||
- PolicyName: codebuild-permissions
|
|
||||||
PolicyDocument:
|
|
||||||
Version: "2012-10-17"
|
|
||||||
Statement:
|
|
||||||
- Effect: Allow
|
|
||||||
Action:
|
|
||||||
- logs:CreateLogGroup
|
|
||||||
- logs:CreateLogStream
|
|
||||||
- logs:PutLogEvents
|
|
||||||
Resource: !Sub "arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codebuild/exec-aide-build*"
|
|
||||||
- Effect: Allow
|
|
||||||
Action:
|
|
||||||
- s3:GetObject
|
|
||||||
- s3:PutObject
|
|
||||||
- s3:GetBucketLocation
|
|
||||||
Resource:
|
|
||||||
- !GetAtt ArtifactBucket.Arn
|
|
||||||
- !Sub "${ArtifactBucket.Arn}/*"
|
|
||||||
- Effect: Allow
|
|
||||||
Action: sts:AssumeRole
|
|
||||||
Resource:
|
|
||||||
- !Sub "arn:aws:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}"
|
|
||||||
- !Sub "arn:aws:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
|
|
||||||
- !Sub "arn:aws:iam::${AWS::AccountId}:role/cdk-hnb659fds-image-publishing-role-${AWS::AccountId}-${AWS::Region}"
|
|
||||||
- !Sub "arn:aws:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}"
|
|
||||||
- !Sub "arn:aws:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}"
|
|
||||||
- Effect: Allow
|
|
||||||
Action:
|
|
||||||
- ecr:GetAuthorizationToken
|
|
||||||
Resource: "*"
|
|
||||||
- Effect: Allow
|
|
||||||
Action:
|
|
||||||
- ecr:DescribeRepositories
|
|
||||||
- ecr:BatchCheckLayerAvailability
|
|
||||||
- ecr:GetDownloadUrlForLayer
|
|
||||||
- ecr:BatchGetImage
|
|
||||||
- ecr:PutImage
|
|
||||||
- ecr:InitiateLayerUpload
|
|
||||||
- ecr:UploadLayerPart
|
|
||||||
- ecr:CompleteLayerUpload
|
|
||||||
Resource: !Sub "arn:aws:ecr:${AWS::Region}:${AWS::AccountId}:repository/cdk-hnb659fds-container-assets-${AWS::AccountId}-${AWS::Region}"
|
|
||||||
|
|
||||||
CodeBuildProject:
|
|
||||||
Type: AWS::CodeBuild::Project
|
|
||||||
Properties:
|
|
||||||
Name: exec-aide-build
|
|
||||||
Description: Build and deploy exec-aide CDK stack
|
|
||||||
ServiceRole: !GetAtt CodeBuildRole.Arn
|
|
||||||
Artifacts:
|
|
||||||
Type: CODEPIPELINE
|
|
||||||
Environment:
|
|
||||||
Type: ARM_CONTAINER
|
|
||||||
ComputeType: BUILD_GENERAL1_SMALL
|
|
||||||
Image: aws/codebuild/amazonlinux-aarch64-standard:3.0
|
|
||||||
EnvironmentVariables: []
|
|
||||||
PrivilegedMode: true
|
|
||||||
Source:
|
|
||||||
Type: CODEPIPELINE
|
|
||||||
BuildSpec: buildspec.yml
|
|
||||||
TimeoutInMinutes: 10
|
|
||||||
|
|
||||||
PipelineRole:
|
|
||||||
Type: AWS::IAM::Role
|
|
||||||
Properties:
|
|
||||||
RoleName: exec-aide-pipeline
|
|
||||||
AssumeRolePolicyDocument:
|
|
||||||
Version: "2012-10-17"
|
|
||||||
Statement:
|
|
||||||
- Effect: Allow
|
|
||||||
Principal:
|
|
||||||
Service: codepipeline.amazonaws.com
|
|
||||||
Action: sts:AssumeRole
|
|
||||||
Policies:
|
|
||||||
- PolicyName: pipeline-permissions
|
|
||||||
PolicyDocument:
|
|
||||||
Version: "2012-10-17"
|
|
||||||
Statement:
|
|
||||||
- Effect: Allow
|
|
||||||
Action:
|
|
||||||
- codeconnections:UseConnection
|
|
||||||
Resource: !Ref ConnectionArn
|
|
||||||
- Effect: Allow
|
|
||||||
Action:
|
|
||||||
- s3:GetObject
|
|
||||||
- s3:PutObject
|
|
||||||
- s3:GetBucketLocation
|
|
||||||
Resource:
|
|
||||||
- !GetAtt ArtifactBucket.Arn
|
|
||||||
- !Sub "${ArtifactBucket.Arn}/*"
|
|
||||||
- Effect: Allow
|
|
||||||
Action:
|
|
||||||
- codebuild:StartBuild
|
|
||||||
- codebuild:BatchGetBuilds
|
|
||||||
Resource: !GetAtt CodeBuildProject.Arn
|
|
||||||
|
|
||||||
Pipeline:
|
|
||||||
Type: AWS::CodePipeline::Pipeline
|
|
||||||
Properties:
|
|
||||||
Name: exec-aide-pipeline
|
|
||||||
RoleArn: !GetAtt PipelineRole.Arn
|
|
||||||
ArtifactStore:
|
|
||||||
Type: S3
|
|
||||||
Location: !Ref ArtifactBucket
|
|
||||||
Stages:
|
|
||||||
- Name: Source
|
|
||||||
Actions:
|
|
||||||
- Name: GitHub
|
|
||||||
ActionTypeId:
|
|
||||||
Category: Source
|
|
||||||
Owner: AWS
|
|
||||||
Provider: CodeStarSourceConnection
|
|
||||||
Version: "1"
|
|
||||||
Configuration:
|
|
||||||
ConnectionArn: !Ref ConnectionArn
|
|
||||||
FullRepositoryId: !Sub "${GitHubOwner}/${GitHubRepo}"
|
|
||||||
BranchName: !Ref GitHubBranch
|
|
||||||
DetectChanges: true
|
|
||||||
OutputArtifacts:
|
|
||||||
- Name: SourceOutput
|
|
||||||
|
|
||||||
- Name: Build
|
|
||||||
Actions:
|
|
||||||
- Name: CDKDeploy
|
|
||||||
ActionTypeId:
|
|
||||||
Category: Build
|
|
||||||
Owner: AWS
|
|
||||||
Provider: CodeBuild
|
|
||||||
Version: "1"
|
|
||||||
Configuration:
|
|
||||||
ProjectName: !Ref CodeBuildProject
|
|
||||||
InputArtifacts:
|
|
||||||
- Name: SourceOutput
|
|
||||||
OutputArtifacts:
|
|
||||||
- Name: BuildOutput
|
|
||||||
|
|
||||||
Outputs:
|
|
||||||
PipelineName:
|
|
||||||
Value: !Ref Pipeline
|
|
||||||
PipelineUrl:
|
|
||||||
Value: !Sub "https://${AWS::Region}.console.aws.amazon.com/codesuite/codepipeline/pipelines/${Pipeline}/view"
|
|
||||||
ArtifactBucketName:
|
|
||||||
Value: !Ref ArtifactBucket
|
|
||||||
Reference in a new issue