StandardNpmSynthOptions

class aws_cdk.pipelines.StandardNpmSynthOptions(*, cloud_assembly_artifact, source_artifact, action_name=None, additional_artifacts=None, copy_environment_variables=None, environment=None, environment_variables=None, project_name=None, role_policy_statements=None, subdirectory=None, subnet_selection=None, vpc=None, build_command=None, install_command=None, synth_command=None)

Bases: aws_cdk.pipelines.SimpleSynthOptions

(experimental) Options for a convention-based synth using NPM.

Parameters
  • cloud_assembly_artifact (Artifact) – (experimental) The artifact where the CloudAssembly should be emitted.

  • source_artifact (Artifact) – (experimental) The source artifact of the CodePipeline.

  • action_name (Optional[str]) – (experimental) Name of the build action. Default: ‘Synth’

  • additional_artifacts (Optional[Sequence[AdditionalArtifact]]) – (experimental) Produce additional output artifacts after the build based on the given directories. Can be used to produce additional artifacts during the build step, separate from the cloud assembly, which can be used further on in the pipeline. Directories are evaluated with respect to subdirectory. Default: - No additional artifacts generated

  • copy_environment_variables (Optional[Sequence[str]]) – (experimental) Environment variables to copy over from parent env. These are environment variables that are being used by the build. Default: - No environment variables copied

  • environment (Optional[BuildEnvironment]) – (experimental) Build environment to use for CodeBuild job. Default: BuildEnvironment.LinuxBuildImage.STANDARD_4_0

  • environment_variables (Optional[Mapping[str, BuildEnvironmentVariable]]) – (experimental) Environment variables to send into build. Default: - No additional environment variables

  • project_name (Optional[str]) – (experimental) Name of the CodeBuild project. Default: - Automatically generated

  • role_policy_statements (Optional[Sequence[PolicyStatement]]) – (experimental) Policy statements to add to role used during the synth. Can be used to add acces to a CodeArtifact repository etc. Default: - No policy statements added to CodeBuild Project Role

  • subdirectory (Optional[str]) – (experimental) Directory inside the source where package.json and cdk.json are located. Default: - Repository root

  • subnet_selection (Optional[SubnetSelection]) – (experimental) Which subnets to use. Only used if ‘vpc’ is supplied. Default: - All private subnets.

  • vpc (Optional[IVpc]) – (experimental) The VPC where to execute the SimpleSynth. Default: - No VPC

  • build_command (Optional[str]) – (experimental) The build command. By default, we assume NPM projects are either written in JavaScript or are using ts-node, so don’t need a build command. Otherwise, put the build command here, for example npm run build. Default: - No build required

  • install_command (Optional[str]) – (experimental) The install command. Default: ‘npm ci’

  • synth_command (Optional[str]) – (experimental) The synth command. Default: ‘npx cdk synth’

Stability

experimental

Attributes

action_name

(experimental) Name of the build action.

Default

‘Synth’

Stability

experimental

Return type

Optional[str]

additional_artifacts

(experimental) Produce additional output artifacts after the build based on the given directories.

Can be used to produce additional artifacts during the build step, separate from the cloud assembly, which can be used further on in the pipeline.

Directories are evaluated with respect to subdirectory.

Default
  • No additional artifacts generated

Stability

experimental

Return type

Optional[List[AdditionalArtifact]]

build_command

(experimental) The build command.

By default, we assume NPM projects are either written in JavaScript or are using ts-node, so don’t need a build command.

Otherwise, put the build command here, for example npm run build.

Default
  • No build required

Stability

experimental

Return type

Optional[str]

cloud_assembly_artifact

(experimental) The artifact where the CloudAssembly should be emitted.

Stability

experimental

Return type

Artifact

copy_environment_variables

(experimental) Environment variables to copy over from parent env.

These are environment variables that are being used by the build.

Default
  • No environment variables copied

Stability

experimental

Return type

Optional[List[str]]

environment

(experimental) Build environment to use for CodeBuild job.

Default

BuildEnvironment.LinuxBuildImage.STANDARD_4_0

Stability

experimental

Return type

Optional[BuildEnvironment]

environment_variables

(experimental) Environment variables to send into build.

Default
  • No additional environment variables

Stability

experimental

Return type

Optional[Mapping[str, BuildEnvironmentVariable]]

install_command

(experimental) The install command.

Default

‘npm ci’

Stability

experimental

Return type

Optional[str]

project_name

(experimental) Name of the CodeBuild project.

Default
  • Automatically generated

Stability

experimental

Return type

Optional[str]

role_policy_statements

(experimental) Policy statements to add to role used during the synth.

Can be used to add acces to a CodeArtifact repository etc.

Default
  • No policy statements added to CodeBuild Project Role

Stability

experimental

Return type

Optional[List[PolicyStatement]]

source_artifact

(experimental) The source artifact of the CodePipeline.

Stability

experimental

Return type

Artifact

subdirectory

(experimental) Directory inside the source where package.json and cdk.json are located.

Default
  • Repository root

Stability

experimental

Return type

Optional[str]

subnet_selection

(experimental) Which subnets to use.

Only used if ‘vpc’ is supplied.

Default
  • All private subnets.

Stability

experimental

Return type

Optional[SubnetSelection]

synth_command

(experimental) The synth command.

Default

‘npx cdk synth’

Stability

experimental

Return type

Optional[str]

vpc

(experimental) The VPC where to execute the SimpleSynth.

Default
  • No VPC

Stability

experimental

Return type

Optional[IVpc]