How to use the @aws-cdk/aws-codebuild.LinuxBuildImage.STANDARD_2_0 function in @aws-cdk/aws-codebuild

To help you get started, we’ve selected a few @aws-cdk/aws-codebuild examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github fourTheorem / slic-starter / cicd / lib / projects / integration-test-project.ts View on Github external
)
    // Allow access to secret environment variables in Parameter Store required for tests
    role.addToPolicy(
      new iam.PolicyStatement({
        actions: ['ssm:GetParameters'],
        resources: [
          `arn:aws:ssm:${config.region}:${
            config.accountIds.cicd
          }:parameter/test/*`
        ]
      })
    )
    super(scope, id, {
      projectName: `${props.stageName}IntegrationTest`,
      environment: {
        buildImage: LinuxBuildImage.STANDARD_2_0
      },
      environmentVariables: {
        SLIC_STAGE: {
          type: BuildEnvironmentVariableType.PLAINTEXT,
          value: props.stageName
        },
        CROSS_ACCOUNT_ID: {
          type: BuildEnvironmentVariableType.PLAINTEXT,
          value: `${config.accountIds[props.stageName]}`
        },
        MAILOSAUR_API_KEY: {
          type: BuildEnvironmentVariableType.PARAMETER_STORE,
          value: '/test/mailosaur/apiKey'
        },
        MAILOSAUR_SERVER_ID: {
          type: BuildEnvironmentVariableType.PARAMETER_STORE,
github fourTheorem / slic-starter / cicd / lib / projects / e2e-test-project.ts View on Github external
// Allow access to secret environment variables in Parameter Store required for tests
    role.addToPolicy(
      new iam.PolicyStatement({
        actions: ['ssm:GetParameters'],
        resources: [
          `arn:aws:ssm:${config.region}:${
            config.accountIds.cicd
          }:parameter/test/*`
        ]
      })
    )

    super(scope, id, {
      projectName: `${props.stageName}E2ETest`,
      environment: {
        buildImage: LinuxBuildImage.STANDARD_2_0
      },
      environmentVariables: {
        SLIC_STAGE: {
          type: BuildEnvironmentVariableType.PLAINTEXT,
          value: props.stageName
        },
        CROSS_ACCOUNT_ID: {
          type: BuildEnvironmentVariableType.PLAINTEXT,
          value: `${config.accountIds[props.stageName]}`
        },
        MAILOSAUR_API_KEY: {
          type: BuildEnvironmentVariableType.PARAMETER_STORE,
          value: '/test/mailosaur/apiKey'
        },
        MAILOSAUR_SERVER_ID: {
          type: BuildEnvironmentVariableType.PARAMETER_STORE,
github fourTheorem / slic-starter / cicd / lib / code-build-environments.ts View on Github external
import { ComputeType, LinuxBuildImage } from '@aws-cdk/aws-codebuild'

export const defaultEnvironment = {
  buildImage: LinuxBuildImage.STANDARD_2_0,
  computeType: ComputeType.SMALL,
  privileged: false
}

export const defaultRuntimes = {
  'runtime-versions': {
    nodejs: 10,
    python: 3.7
  }
}
github cloudcomponents / cdk-components / packages / cdk-pull-request-check / src / pull_request_check.ts View on Github external
public constructor(
        scope: Construct,
        id: string,
        props: PullRequestCheckProps,
    ) {
        super(scope, id);

        const {
            repository,
            buildSpec,
            buildImage = LinuxBuildImage.STANDARD_2_0,
            computeType = buildImage.defaultComputeType,
        } = props;

        const lambdaRole = new Role(this, 'LambdaRole', {
            assumedBy: new ServicePrincipal('lambda.amazonaws.com'),
        });

        lambdaRole.addToPolicy(
            new PolicyStatement({
                resources: ['*'],
                actions: [
                    'codebuild:*',
                    'codecommit:*',
                    'logs:CreateLogGroup',
                    'logs:CreateLogStream',
                    'logs:PutLogEvents',
github jeshan / scale-your-cloudformation / lib / pipeline-construct.js View on Github external
super(scope, 'pipeline');
        let project = new Project(this, 'deploy-site', {
            description: 'Deploys website at scaleyourcloudformation.com',
            timeout: Duration.minutes(30),
            badge: true,
            source: Source.gitHub({
                cloneDepth: 1,
                owner: 'jeshan',
                repo: 'scale-your-cloudformation',
                webhookFilters: [
                    FilterGroup.inEventOf([EventAction.PUSH]).andBranchIs(
                        'master',
                    ),
                ],
            }),
            environment: { buildImage: LinuxBuildImage.STANDARD_2_0 },
            buildSpec: BuildSpec.fromObject({
                version: '0.2',
                phases: {
                    install: {
                        'runtime-versions': {
                            nodejs: '10',
                        },
                    },
                    pre_build: {
                        commands: ['npm i -g aws-cdk@1.16.3', 'npm i'],
                    },
                    build: {
                        commands: [
                            'cdk bootstrap',
                            'cdk diff || true',
                            'cdk deploy',