How to use the @aws-cdk/aws-codebuild.PipelineBuildAction 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 seagull-js / seagull / packages / pipeline / src / lib / cdk / stack.ts View on Github external
postBuildCmds.push('npm run test')
    const deployEnv = `BRANCH_NAME=${this.branchName} DEPLOY_MODE=${this.mode}`
    postBuildCmds.push(`${deployEnv} NO_PROFILE_CHECK=true npm run deploy`)

    const install = { commands: installCmds }
    const build = { commands: buildCmds }
    const postBuild = { commands: postBuildCmds }
    const phases = { build, install, post_build: postBuild }
    const buildSpec = { phases, version: '0.2' }
    const role = this.role
    const projectConfig = { buildSpec, environment, role }
    const project = new CB.PipelineProject(this, 'BuildProject', projectConfig)
    const stage = this.pipeline.addStage('BuildStage', { placement })
    const buildProps = { project, stage }
    // tslint:disable-next-line:no-unused-expression
    new CB.PipelineBuildAction(this, 'CodeBuild', buildProps)
  }
github seagull-js / seagull / packages / deploy-aws / src / seagull_stack.ts View on Github external
const projectConfig = this.createProjectConfig(config)
    const additionalOutputArtifactNames = this.getAdditionalOutputArtifactNames(
      name,
      config
    )
    const project = new CB.PipelineProject(this, projectName, projectConfig)
    const stage = pipeline.addStage(stageName, { placement: { atIndex } })
    const stageConfig = {
      additionalInputArtifacts: config.additionalInputArtifacts,
      additionalOutputArtifactNames,
      inputArtifact: config.inputArtifact,
      outputArtifactName: name,
      project,
      stage,
    }
    return new CB.PipelineBuildAction(this, name, stageConfig)
  }