EndemolShineGroup/serverless-slack-notifier

View on GitHub
conf/template.yml

Summary

Maintainability
Test Coverage
Description: serverless-slack-notifier build stack
Resources:
  CodeBuildIamPolicy:
    Type: 'AWS::IAM::Policy'
    Properties:
      PolicyName: CodeBuildServicePolicy
      PolicyDocument:
        Version: '2012-10-17'
        Statement:
          - Effect: Allow
            Resource:
              - 'Fn::Join':
                  - ':'
                  - - 'arn:aws:logs'
                    - Ref: 'AWS::Region'
                    - Ref: 'AWS::AccountId'
                    - log-group
                    - /aws/codebuild/serverless-slack-notifier
              - 'Fn::Join':
                  - ':'
                  - - 'arn:aws:logs'
                    - Ref: 'AWS::Region'
                    - Ref: 'AWS::AccountId'
                    - log-group
                    - /aws/codebuild/serverless-slack-notifier
                    - '*'
            Action:
              - 'logs:CreateLogGroup'
              - 'logs:CreateLogStream'
              - 'logs:PutLogEvents'
      Roles:
        - Ref: CodeBuildIamRole
    DependsOn: CodeBuildIamRole
  CodeBuildIamRole:
    Type: 'AWS::IAM::Role'
    Properties:
      RoleName: CodeBuildServiceRole
      AssumeRolePolicyDocument:
        Version: '2012-10-17'
        Statement:
          - Effect: Allow
            Principal:
              Service: codebuild.amazonaws.com
            Action: 'sts:AssumeRole'
  CodeBuildProject:
    Type: 'AWS::CodeBuild::Project'
    Properties:
      Artifacts:
        Type: NO_ARTIFACTS
      Cache:
        Type: NO_CACHE
      Environment:
        ComputeType: BUILD_GENERAL1_SMALL
        Image: 'aws/codebuild/nodejs:8.11.0'
        Type: LINUX_CONTAINER
      Name: serverless-slack-notifier
      ServiceRole:
        'Fn::GetAtt':
          - CodeBuildIamRole
          - Arn
      Source:
        GitCloneDepth: 0
        InsecureSsl: false
        Location: 'https://github.com/EndemolShineGroup/serverless-slack-notifier'
        ReportBuildStatus: true
        Type: GITHUB
      Triggers:
        Webhook: true
    DependsOn: CodeBuildIamRole