Skip to content

Instantly share code, notes, and snippets.

@tongueroo
Created November 20, 2019 02:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tongueroo/ccc6191b0f2e4d248fd517e578d714af to your computer and use it in GitHub Desktop.
Save tongueroo/ccc6191b0f2e4d248fd517e578d714af to your computer and use it in GitHub Desktop.
---
Description: 'CodeBuild Project: cody-demo'
Resources:
CodeBuild:
Type: AWS::CodeBuild::Project
Properties:
Name: cody-demo
Description: cody-demo
Artifacts:
Type: NO_ARTIFACTS
ServiceRole:
Ref: IamRole
BadgeEnabled: true
TimeoutInMinutes: 20
LogsConfig:
CloudWatchLogs:
Status: ENABLED
Source:
Type: GITHUB
GitSubmodulesConfig:
FetchSubmodules: true
BuildSpec: ".cody/buildspec.yml"
ReportBuildStatus: true
Location: https://github.com/tongueroo/cody-demo
Environment:
ComputeType: BUILD_GENERAL1_SMALL
ImagePullCredentialsType: CODEBUILD
PrivilegedMode: true
Image: aws/codebuild/ruby:2.5.3-1.7.0
Type: LINUX_CONTAINER
EnvironmentVariables:
- Type: PLAINTEXT
Name: JETS_ENV
Value: test
IamRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Statement:
- Action:
- sts:AssumeRole
Effect: Allow
Principal:
Service:
- codebuild.amazonaws.com
Version: '2012-10-17'
Path: "/"
Policies:
- PolicyName: CodeBuildAccess
PolicyDocument:
Version: '2012-10-17'
Statement:
- Action:
- logs:CreateLogGroup
- logs:CreateLogStream
- logs:PutLogEvents
- ssm:DescribeDocumentParameters
- ssm:DescribeParameters
- ssm:GetParameter*
Effect: Allow
Resource: "*"
ManagedPolicyArns:
- arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment