Class StandardYarnSynthOptions
(deprecated) Options for a convention-based synth using Yarn.
Inheritance
Namespace: Amazon.CDK.Pipelines
Assembly: Amazon.CDK.Pipelines.dll
Syntax (csharp)
public class StandardYarnSynthOptions : Object, IStandardYarnSynthOptions, ISimpleSynthOptions
Syntax (vb)
Public Class StandardYarnSynthOptions
Inherits Object
Implements IStandardYarnSynthOptions, ISimpleSynthOptions
Remarks
Stability: Deprecated
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CodeBuild;
using Amazon.CDK.AWS.CodePipeline;
using Amazon.CDK.AWS.EC2;
using Amazon.CDK.AWS.IAM;
using Amazon.CDK.AWS.S3;
using Amazon.CDK.Pipelines;
Artifact artifact;
Bucket bucket;
IBuildImage buildImage;
BuildSpec buildSpec;
PolicyStatement policyStatement;
Subnet subnet;
SubnetFilter subnetFilter;
var value;
Vpc vpc;
var standardYarnSynthOptions = new StandardYarnSynthOptions {
CloudAssemblyArtifact = artifact,
SourceArtifact = artifact,
// the properties below are optional
ActionName = "actionName",
AdditionalArtifacts = new [] { new AdditionalArtifact {
Artifact = artifact,
Directory = "directory"
} },
BuildCommand = "buildCommand",
BuildSpec = buildSpec,
CopyEnvironmentVariables = new [] { "copyEnvironmentVariables" },
Environment = new BuildEnvironment {
BuildImage = buildImage,
Certificate = new BuildEnvironmentCertificate {
Bucket = bucket,
ObjectKey = "objectKey"
},
ComputeType = ComputeType.SMALL,
EnvironmentVariables = new Dictionary<string, BuildEnvironmentVariable> {
{ "environmentVariablesKey", new BuildEnvironmentVariable {
Value = value,
// the properties below are optional
Type = BuildEnvironmentVariableType.PLAINTEXT
} }
},
Privileged = false
},
EnvironmentVariables = new Dictionary<string, BuildEnvironmentVariable> {
{ "environmentVariablesKey", new BuildEnvironmentVariable {
Value = value,
// the properties below are optional
Type = BuildEnvironmentVariableType.PLAINTEXT
} }
},
InstallCommand = "installCommand",
ProjectName = "projectName",
RolePolicyStatements = new [] { policyStatement },
Subdirectory = "subdirectory",
SubnetSelection = new SubnetSelection {
AvailabilityZones = new [] { "availabilityZones" },
OnePerAz = false,
SubnetFilters = new [] { subnetFilter },
SubnetGroupName = "subnetGroupName",
SubnetName = "subnetName",
Subnets = new [] { subnet },
SubnetType = SubnetType.ISOLATED
},
SynthCommand = "synthCommand",
TestCommands = new [] { "testCommands" },
Vpc = vpc
};
Synopsis
Constructors
StandardYarnSynthOptions() |
Properties
ActionName | (deprecated) Name of the build action. |
AdditionalArtifacts | (deprecated) Produce additional output artifacts after the build based on the given directories. |
BuildCommand | (deprecated) The build command. |
BuildSpec | (deprecated) custom BuildSpec that is merged with the generated one. |
CloudAssemblyArtifact | (deprecated) The artifact where the CloudAssembly should be emitted. |
CopyEnvironmentVariables | (deprecated) Environment variables to copy over from parent env. |
Environment | (deprecated) Build environment to use for CodeBuild job. |
EnvironmentVariables | (deprecated) Environment variables to send into build. |
InstallCommand | (deprecated) The install command. |
ProjectName | (deprecated) Name of the CodeBuild project. |
RolePolicyStatements | (deprecated) Policy statements to add to role used during the synth. |
SourceArtifact | (deprecated) The source artifact of the CodePipeline. |
Subdirectory | (deprecated) Directory inside the source where package.json and cdk.json are located. |
SubnetSelection | (deprecated) Which subnets to use. |
SynthCommand | (deprecated) The synth command. |
TestCommands | (deprecated) Test commands. |
Vpc | (deprecated) The VPC where to execute the SimpleSynth. |
Constructors
StandardYarnSynthOptions()
public StandardYarnSynthOptions()
Properties
ActionName
(deprecated) Name of the build action.
public string ActionName { get; set; }
Property Value
System.String
Remarks
Default: 'Synth'
Stability: Deprecated
AdditionalArtifacts
(deprecated) Produce additional output artifacts after the build based on the given directories.
public IAdditionalArtifact[] AdditionalArtifacts { get; set; }
Property Value
Remarks
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
BuildCommand
(deprecated) The build command.
public string BuildCommand { get; set; }
Property Value
System.String
Remarks
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
BuildSpec
(deprecated) custom BuildSpec that is merged with the generated one.
public BuildSpec BuildSpec { get; set; }
Property Value
Remarks
Default: - none
Stability: Deprecated
CloudAssemblyArtifact
(deprecated) The artifact where the CloudAssembly should be emitted.
public Artifact_ CloudAssemblyArtifact { get; set; }
Property Value
Remarks
Stability: Deprecated
CopyEnvironmentVariables
(deprecated) Environment variables to copy over from parent env.
public string[] CopyEnvironmentVariables { get; set; }
Property Value
System.String[]
Remarks
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.
public IBuildEnvironment Environment { get; set; }
Property Value
Remarks
Default: BuildEnvironment.LinuxBuildImage.STANDARD_5_0
Stability: Deprecated
EnvironmentVariables
(deprecated) Environment variables to send into build.
public IDictionary<string, IBuildEnvironmentVariable> EnvironmentVariables { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, IBuildEnvironmentVariable>
Remarks
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
InstallCommand
(deprecated) The install command.
public string InstallCommand { get; set; }
Property Value
System.String
Remarks
Default: 'yarn install --frozen-lockfile'
Stability: Deprecated
ProjectName
(deprecated) Name of the CodeBuild project.
public string ProjectName { get; set; }
Property Value
System.String
Remarks
Default: - Automatically generated
Stability: Deprecated
RolePolicyStatements
(deprecated) Policy statements to add to role used during the synth.
public PolicyStatement[] RolePolicyStatements { get; set; }
Property Value
Remarks
Can be used to add acces to a CodeArtifact repository etc.
Default: - No policy statements added to CodeBuild Project Role
Stability: Deprecated
SourceArtifact
(deprecated) The source artifact of the CodePipeline.
public Artifact_ SourceArtifact { get; set; }
Property Value
Remarks
Stability: Deprecated
Subdirectory
(deprecated) Directory inside the source where package.json and cdk.json are located.
public string Subdirectory { get; set; }
Property Value
System.String
Remarks
Default: - Repository root
Stability: Deprecated
SubnetSelection
(deprecated) Which subnets to use.
public ISubnetSelection SubnetSelection { get; set; }
Property Value
Remarks
Only used if 'vpc' is supplied.
Default: - All private subnets.
Stability: Deprecated
SynthCommand
(deprecated) The synth command.
public string SynthCommand { get; set; }
Property Value
System.String
Remarks
Default: 'npx cdk synth'
Stability: Deprecated
TestCommands
(deprecated) Test commands.
public string[] TestCommands { get; set; }
Property Value
System.String[]
Remarks
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.
public IVpc Vpc { get; set; }
Property Value
Remarks
Default: - No VPC
Stability: Deprecated