Skip to content

Commit

Permalink
new project
Browse files Browse the repository at this point in the history
  • Loading branch information
sehrish30 committed May 22, 2023
1 parent 994f5e5 commit 5956284
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 13 deletions.
50 changes: 37 additions & 13 deletions external-verification-service/resources/CodePipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ CodePipeline:
Properties:
Name: external-verification-service-pipeline-${self:provider.stage}
# allow code pipeline to create a service role so it can be used with new pipeline
RoleArn: !GetAtt CodePipelineServiceRole.Arn
RoleArn: !GetAtt CodeDeployServiceRole.Arn
ArtifactStore:
Type: S3
Location: !Ref CodePipelineArtifactStore
Expand Down Expand Up @@ -38,18 +38,18 @@ CodePipeline:
- Name: BuildOutput
InputArtifacts:
- Name: SourceCode
# - Name: Dev
# Actions:
# - Name: Deploy
# ActionTypeId:
# Category: Build
# Owner: AWS
# Provider: CodeBuild
# Version: "1"
# Configuration:
# ProjectName: !Ref CodeBuildDevProject
# InputArtifacts:
# - Name: SourceCode
- Name: Deploy
Actions:
- Name: Deploy
ActionTypeId:
Category: Build
Owner: AWS
Provider: CodeBuild
Version: "1"
Configuration:
ProjectName: !Ref CodeBuildDeployDevProject
InputArtifacts:
- Name: SourceCode
# - Name: QA
# Actions:
# - Name: Deploy
Expand Down Expand Up @@ -202,6 +202,30 @@ CodeBuildProdProject:
- Name: ENV_NAME
Value: prod

# because we need to deploy it serverless deploy which will deploy to many resoirces
CodeDeployServiceRole:
Type: "AWS::IAM::Role"
Properties:
AssumeRolePolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: "Allow"
Principal:
Service:
- codepipeline.amazonaws.com
- codedeploy.amazonaws.com
- codebuild.amazonaws.com
Action: "sts:AssumeRole"
Path: "/"
Policies:
- PolicyName: "AdministratorAccess"
PolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: "Allow"
Action: "*"
Resource: "*"

CodePipelineServiceRole:
Type: AWS::IAM::Role
Properties:
Expand Down
1 change: 1 addition & 0 deletions external-verification-service/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ resources:
CodePipeline: ${file(./resources/CodePipeline.yml):CodePipeline}
CodeBuildSourceCredentials: ${file(./resources/CodePipeline.yml):CodeBuildSourceCredentials}
CodePipelineServiceRole: ${file(./resources/CodePipeline.yml):CodePipelineServiceRole}
CodeDeployServiceRole: ${file(./resources/CodePipeline.yml):CodeDeployServiceRole}
CodeBuildProject: ${file(./resources/CodePipeline.yml):CodeBuildProject}
CodeBuildDeployDevProject: ${file(./resources/CodePipeline.yml):CodeBuildDeployDevProject}
# CodeBuildDevProject: ${file(./resources/CodePipeline.yml):CodeBuildDevProject}
Expand Down

0 comments on commit 5956284

Please sign in to comment.