How to use the @aws-cdk/aws-codebuild.FilterGroup.inEventOf 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 / source-project.ts View on Github external
constructor(scope: Construct, id: string, props: SourceProjectProps) {
    const { bucket, ...rest } = props

    const buildSource = Source.gitHub({
      owner: config.sourceRepoOwner,
      repo: config.sourceRepoName,
      webhook: true,
      webhookFilters: [
        FilterGroup.inEventOf(EventAction.PUSH).andBranchIs(config.sourceBranch)
      ]
    })

    const artifacts = Artifacts.s3({
      bucket: props.bucket,
      name: SLIC_PIPELINE_SOURCE_ARTIFACT,
      includeBuildId: false,
      packageZip: true
    })

    super(scope, id, {
      buildSpec: BuildSpec.fromObject({
        version: '0.2',
        phases: {
          install: {
            ...defaultRuntimes,
github jeshan / scale-your-cloudformation / lib / pipeline-construct.js View on Github external
constructor(scope) {
        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'],
                    },