Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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)
}
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)
}