StandardNpmSynthOptions
- class aws_cdk.pipelines.StandardNpmSynthOptions(*, cloud_assembly_artifact, source_artifact, action_name=None, additional_artifacts=None, build_spec=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, test_commands=None)
Bases:
SimpleSynthOptions
(deprecated) Options for a convention-based synth using NPM.
- Parameters:
cloud_assembly_artifact (
Artifact
) – (deprecated) The artifact where the CloudAssembly should be emitted.source_artifact (
Artifact
) – (deprecated) The source artifact of the CodePipeline.action_name (
Optional
[str
]) – (deprecated) Name of the build action. Default: ‘Synth’additional_artifacts (
Optional
[Sequence
[Union
[AdditionalArtifact
,Dict
[str
,Any
]]]]) – (deprecated) 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 tosubdirectory
. Default: - No additional artifacts generatedbuild_spec (
Optional
[BuildSpec
]) – (deprecated) custom BuildSpec that is merged with the generated one. Default: - nonecopy_environment_variables (
Optional
[Sequence
[str
]]) – (deprecated) Environment variables to copy over from parent env. These are environment variables that are being used by the build. Default: - No environment variables copiedenvironment (
Union
[BuildEnvironment
,Dict
[str
,Any
],None
]) – (deprecated) Build environment to use for CodeBuild job. Default: BuildEnvironment.LinuxBuildImage.STANDARD_5_0environment_variables (
Optional
[Mapping
[str
,Union
[BuildEnvironmentVariable
,Dict
[str
,Any
]]]]) – (deprecated) Environment variables to send into build. NOTE: You may run into the 1000-character limit for the Action configuration if you have a large number of variables or if their names or values are very long. If you do, pass them to the underlying CodeBuild project directly inenvironment
instead. However, you will not be able to use CodePipeline Variables in this case. Default: - No additional environment variablesproject_name (
Optional
[str
]) – (deprecated) Name of the CodeBuild project. Default: - Automatically generatedrole_policy_statements (
Optional
[Sequence
[PolicyStatement
]]) – (deprecated) 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 Rolesubdirectory (
Optional
[str
]) – (deprecated) Directory inside the source where package.json and cdk.json are located. Default: - Repository rootsubnet_selection (
Union
[SubnetSelection
,Dict
[str
,Any
],None
]) – (deprecated) Which subnets to use. Only used if ‘vpc’ is supplied. Default: - All private subnets.vpc (
Optional
[IVpc
]) – (deprecated) The VPC where to execute the SimpleSynth. Default: - No VPCbuild_command (
Optional
[str
]) – (deprecated) The build command. By default, we assume NPM projects are either written in JavaScript or are usingts-node
, so don’t need a build command. Otherwise, put the build command here, for examplenpm run build
. Default: - No build requiredinstall_command (
Optional
[str
]) – (deprecated) The install command. Default: ‘npm ci’synth_command (
Optional
[str
]) – (deprecated) The synth command. Default: ‘npx cdk synth’test_commands (
Optional
[Sequence
[str
]]) – (deprecated) Test commands. These commands are run after the build commands but before the synth command. Default: - No test commands
- Deprecated:
This class is part of the old API. Use the API based on the
CodePipeline
class instead- Stability:
deprecated
- ExampleMetadata:
infused
Example:
source_artifact = codepipeline.Artifact() cloud_assembly_artifact = codepipeline.Artifact() pipeline = pipelines.CdkPipeline(self, "MyPipeline", cloud_assembly_artifact=cloud_assembly_artifact, synth_action=pipelines.SimpleSynthAction.standard_npm_synth( source_artifact=source_artifact, cloud_assembly_artifact=cloud_assembly_artifact, environment=codebuild.BuildEnvironment( privileged=True ) ) )
Attributes
- action_name
(deprecated) Name of the build action.
- Default:
‘Synth’
- Stability:
deprecated
- additional_artifacts
(deprecated) 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:
deprecated
- build_command
(deprecated) 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:
deprecated
- build_spec
(deprecated) custom BuildSpec that is merged with the generated one.
- Default:
none
- Stability:
deprecated
- cloud_assembly_artifact
(deprecated) The artifact where the CloudAssembly should be emitted.
- Stability:
deprecated
- copy_environment_variables
(deprecated) 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:
deprecated
- environment
(deprecated) Build environment to use for CodeBuild job.
- Default:
BuildEnvironment.LinuxBuildImage.STANDARD_5_0
- Stability:
deprecated
- environment_variables
(deprecated) Environment variables to send into build.
NOTE: You may run into the 1000-character limit for the Action configuration if you have a large number of variables or if their names or values are very long. If you do, pass them to the underlying CodeBuild project directly in
environment
instead. However, you will not be able to use CodePipeline Variables in this case.- Default:
No additional environment variables
- Stability:
deprecated
- install_command
(deprecated) The install command.
- Default:
‘npm ci’
- Stability:
deprecated
- project_name
(deprecated) Name of the CodeBuild project.
- Default:
Automatically generated
- Stability:
deprecated
- role_policy_statements
(deprecated) 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:
deprecated
- source_artifact
(deprecated) The source artifact of the CodePipeline.
- Stability:
deprecated
- subdirectory
(deprecated) Directory inside the source where package.json and cdk.json are located.
- Default:
Repository root
- Stability:
deprecated
- subnet_selection
(deprecated) Which subnets to use.
Only used if ‘vpc’ is supplied.
- Default:
All private subnets.
- Stability:
deprecated
- synth_command
(deprecated) The synth command.
- Default:
‘npx cdk synth’
- Stability:
deprecated
- test_commands
(deprecated) Test commands.
These commands are run after the build commands but before the synth command.
- Default:
No test commands
- Stability:
deprecated
- vpc
(deprecated) The VPC where to execute the SimpleSynth.
- Default:
No VPC
- Stability:
deprecated