StandardYarnSynthOptions
- class aws_cdk.pipelines.StandardYarnSynthOptions(*, 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 Yarn.
- 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: ‘yarn install –frozen-lockfile’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:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_codebuild as codebuild import aws_cdk.aws_codepipeline as codepipeline import aws_cdk.aws_ec2 as ec2 import aws_cdk.aws_iam as iam import aws_cdk.aws_s3 as s3 import aws_cdk.pipelines as pipelines # artifact: codepipeline.Artifact # bucket: s3.Bucket # build_image: codebuild.IBuildImage # build_spec: codebuild.BuildSpec # policy_statement: iam.PolicyStatement # subnet: ec2.Subnet # subnet_filter: ec2.SubnetFilter # value: Any # vpc: ec2.Vpc standard_yarn_synth_options = pipelines.StandardYarnSynthOptions( cloud_assembly_artifact=artifact, source_artifact=artifact, # the properties below are optional action_name="actionName", additional_artifacts=[pipelines.AdditionalArtifact( artifact=artifact, directory="directory" )], build_command="buildCommand", build_spec=build_spec, copy_environment_variables=["copyEnvironmentVariables"], environment=codebuild.BuildEnvironment( build_image=build_image, certificate=codebuild.BuildEnvironmentCertificate( bucket=bucket, object_key="objectKey" ), compute_type=codebuild.ComputeType.SMALL, environment_variables={ "environment_variables_key": codebuild.BuildEnvironmentVariable( value=value, # the properties below are optional type=codebuild.BuildEnvironmentVariableType.PLAINTEXT ) }, privileged=False ), environment_variables={ "environment_variables_key": codebuild.BuildEnvironmentVariable( value=value, # the properties below are optional type=codebuild.BuildEnvironmentVariableType.PLAINTEXT ) }, install_command="installCommand", project_name="projectName", role_policy_statements=[policy_statement], subdirectory="subdirectory", subnet_selection=ec2.SubnetSelection( availability_zones=["availabilityZones"], one_per_az=False, subnet_filters=[subnet_filter], subnet_group_name="subnetGroupName", subnet_name="subnetName", subnets=[subnet], subnet_type=ec2.SubnetType.ISOLATED ), synth_command="synthCommand", test_commands=["testCommands"], vpc=vpc )
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:
‘yarn install –frozen-lockfile’
- 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