pipelines

package
v1.98.1-devpreview Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CdkPipeline_IsConstruct

func CdkPipeline_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func CdkStage_IsConstruct

func CdkStage_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func NewCdkPipeline_Override

func NewCdkPipeline_Override(c CdkPipeline, scope constructs.Construct, id *string, props *CdkPipelineProps)

Experimental.

func NewCdkStage_Override

func NewCdkStage_Override(c CdkStage, scope constructs.Construct, id *string, props *CdkStageProps)

Experimental.

func NewDeployCdkStackAction_Override

func NewDeployCdkStackAction_Override(d DeployCdkStackAction, props *DeployCdkStackActionProps)

Experimental.

func NewPublishAssetsAction_Override

func NewPublishAssetsAction_Override(p PublishAssetsAction, scope constructs.Construct, id *string, props *PublishAssetsActionProps)

Experimental.

func NewShellScriptAction_Override

func NewShellScriptAction_Override(s ShellScriptAction, props *ShellScriptActionProps)

Experimental.

func NewSimpleSynthAction_Override

func NewSimpleSynthAction_Override(s SimpleSynthAction, props *SimpleSynthActionProps)

Experimental.

func NewStackOutput_Override

func NewStackOutput_Override(s StackOutput, artifactFile awscodepipeline.ArtifactPath, outputName *string)

Build a StackOutput from a known artifact and an output name. Experimental.

func NewUpdatePipelineAction_Override

func NewUpdatePipelineAction_Override(u UpdatePipelineAction, scope constructs.Construct, id *string, props *UpdatePipelineActionProps)

Experimental.

func PublishAssetsAction_IsConstruct

func PublishAssetsAction_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func UpdatePipelineAction_IsConstruct

func UpdatePipelineAction_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

Types

type AddManualApprovalOptions

type AddManualApprovalOptions struct {
	// The name of the manual approval action.
	// Experimental.
	ActionName *string `json:"actionName"`
	// The runOrder for this action.
	// Experimental.
	RunOrder *float64 `json:"runOrder"`
}

Options for addManualApproval. Experimental.

type AddStackOptions

type AddStackOptions struct {
	// Base runorder.
	// Experimental.
	ExecuteRunOrder *float64 `json:"executeRunOrder"`
	// Base runorder.
	// Experimental.
	RunOrder *float64 `json:"runOrder"`
}

Additional options for adding a stack deployment. Experimental.

type AddStageOptions

type AddStageOptions struct {
	// Add room for extra actions.
	//
	// You can use this to make extra room in the runOrder sequence between the
	// changeset 'prepare' and 'execute' actions and insert your own actions there.
	// Experimental.
	ExtraRunOrderSpace *float64 `json:"extraRunOrderSpace"`
	// Add manual approvals before executing change sets.
	//
	// This gives humans the opportunity to confirm the change set looks alright
	// before deploying it.
	// Experimental.
	ManualApprovals *bool `json:"manualApprovals"`
}

Options for adding an application stage to a pipeline. Experimental.

type AdditionalArtifact

type AdditionalArtifact struct {
	// Artifact to represent the build directory in the pipeline.
	// Experimental.
	Artifact awscodepipeline.Artifact `json:"artifact"`
	// Directory to be packaged.
	// Experimental.
	Directory *string `json:"directory"`
}

Specification of an additional artifact to generate. Experimental.

type AssetPublishingCommand

type AssetPublishingCommand struct {
	// Asset identifier.
	// Experimental.
	AssetId *string `json:"assetId"`
	// Asset manifest path.
	// Experimental.
	AssetManifestPath *string `json:"assetManifestPath"`
	// Asset selector to pass to `cdk-assets`.
	// Experimental.
	AssetSelector *string `json:"assetSelector"`
	// Type of asset to publish.
	// Experimental.
	AssetType AssetType `json:"assetType"`
}

Instructions to publish certain assets. Experimental.

type AssetType

type AssetType string

Type of the asset that is being published. Experimental.

const (
	AssetType_FILE         AssetType = "FILE"
	AssetType_DOCKER_IMAGE AssetType = "DOCKER_IMAGE"
)

type CdkPipeline

type CdkPipeline interface {
	awscdk.Construct
	CodePipeline() awscodepipeline.Pipeline
	Node() awscdk.ConstructNode
	AddApplicationStage(appStage awscdk.Stage, options *AddStageOptions) CdkStage
	AddStage(stageName *string) CdkStage
	OnPrepare()
	OnSynthesize(session constructs.ISynthesisSession)
	OnValidate() *[]*string
	Prepare()
	StackOutput(cfnOutput awscdk.CfnOutput) StackOutput
	Stage(stageName *string) awscodepipeline.IStage
	Synthesize(session awscdk.ISynthesisSession)
	ToString() *string
	Validate() *[]*string
}

A Pipeline to deploy CDK apps.

Defines an AWS CodePipeline-based Pipeline to deploy CDK applications.

Automatically manages the following:

- Stack dependency order. - Asset publishing. - Keeping the pipeline up-to-date as the CDK apps change. - Using stack outputs later on in the pipeline. Experimental.

func NewCdkPipeline

func NewCdkPipeline(scope constructs.Construct, id *string, props *CdkPipelineProps) CdkPipeline

Experimental.

type CdkPipelineProps

type CdkPipelineProps struct {
	// The artifact you have defined to be the artifact to hold the cloudAssemblyArtifact for the synth action.
	// Experimental.
	CloudAssemblyArtifact awscodepipeline.Artifact `json:"cloudAssemblyArtifact"`
	// CDK CLI version to use in pipeline.
	//
	// Some Actions in the pipeline will download and run a version of the CDK
	// CLI. Specify the version here.
	// Experimental.
	CdkCliVersion *string `json:"cdkCliVersion"`
	// Existing CodePipeline to add deployment stages to.
	//
	// Use this if you want more control over the CodePipeline that gets created.
	// You can choose to not pass this value, in which case a new CodePipeline is
	// created with default settings.
	//
	// If you pass an existing CodePipeline, it should should have been created
	// with `restartExecutionOnUpdate: true`.
	//
	// [disable-awslint:ref-via-interface]
	// Experimental.
	CodePipeline awscodepipeline.Pipeline `json:"codePipeline"`
	// Create KMS keys for cross-account deployments.
	//
	// This controls whether the pipeline is enabled for cross-account deployments.
	//
	// Can only be set if `codePipeline` is not set.
	//
	// By default cross-account deployments are enabled, but this feature requires
	// that KMS Customer Master Keys are created which have a cost of $1/month.
	//
	// If you do not need cross-account deployments, you can set this to `false` to
	// not create those keys and save on that cost (the artifact bucket will be
	// encrypted with an AWS-managed key). However, cross-account deployments will
	// no longer be possible.
	// Experimental.
	CrossAccountKeys *bool `json:"crossAccountKeys"`
	// Name of the pipeline.
	//
	// Can only be set if `codePipeline` is not set.
	// Experimental.
	PipelineName *string `json:"pipelineName"`
	// Whether the pipeline will update itself.
	//
	// This needs to be set to `true` to allow the pipeline to reconfigure
	// itself when assets or stages are being added to it, and `true` is the
	// recommended setting.
	//
	// You can temporarily set this to `false` while you are iterating
	// on the pipeline itself and prefer to deploy changes using `cdk deploy`.
	// Experimental.
	SelfMutating *bool `json:"selfMutating"`
	// The CodePipeline action used to retrieve the CDK app's source.
	// Experimental.
	SourceAction awscodepipeline.IAction `json:"sourceAction"`
	// Which subnets to use.
	//
	// Only used if 'vpc' is supplied.
	// Experimental.
	SubnetSelection *awsec2.SubnetSelection `json:"subnetSelection"`
	// The CodePipeline action build and synthesis step of the CDK app.
	// Experimental.
	SynthAction awscodepipeline.IAction `json:"synthAction"`
	// The VPC where to execute the CdkPipeline actions.
	// Experimental.
	Vpc awsec2.IVpc `json:"vpc"`
}

Properties for a CdkPipeline. Experimental.

type CdkStackActionFromArtifactOptions

type CdkStackActionFromArtifactOptions struct {
	// The CodePipeline artifact that holds the Cloud Assembly.
	// Experimental.
	CloudAssemblyInput awscodepipeline.Artifact `json:"cloudAssemblyInput"`
	// Base name of the action.
	// Experimental.
	BaseActionName *string `json:"baseActionName"`
	// Name of the change set to create and deploy.
	// Experimental.
	ChangeSetName *string `json:"changeSetName"`
	// Run order for the Execute action.
	// Experimental.
	ExecuteRunOrder *float64 `json:"executeRunOrder"`
	// Artifact to write Stack Outputs to.
	// Experimental.
	Output awscodepipeline.Artifact `json:"output"`
	// Filename in output to write Stack outputs to.
	// Experimental.
	OutputFileName *string `json:"outputFileName"`
	// Run order for the Prepare action.
	// Experimental.
	PrepareRunOrder *float64 `json:"prepareRunOrder"`
	// The name of the stack that should be created/updated.
	// Experimental.
	StackName *string `json:"stackName"`
}

Options for the 'fromStackArtifact' operation. Experimental.

type CdkStage

type CdkStage interface {
	awscdk.Construct
	Node() awscdk.ConstructNode
	AddActions(actions ...awscodepipeline.IAction)
	AddApplication(appStage awscdk.Stage, options *AddStageOptions)
	AddManualApprovalAction(options *AddManualApprovalOptions)
	AddStackArtifactDeployment(stackArtifact cxapi.CloudFormationStackArtifact, options *AddStackOptions)
	DeploysStack(artifactId *string) *bool
	NextSequentialRunOrder(count *float64) *float64
	OnPrepare()
	OnSynthesize(session constructs.ISynthesisSession)
	OnValidate() *[]*string
	Prepare()
	Synthesize(session awscdk.ISynthesisSession)
	ToString() *string
	Validate() *[]*string
}

Stage in a CdkPipeline.

You don't need to instantiate this class directly. Use `cdkPipeline.addStage()` instead. Experimental.

func NewCdkStage

func NewCdkStage(scope constructs.Construct, id *string, props *CdkStageProps) CdkStage

Experimental.

type CdkStageProps

type CdkStageProps struct {
	// The CodePipeline Artifact with the Cloud Assembly.
	// Experimental.
	CloudAssemblyArtifact awscodepipeline.Artifact `json:"cloudAssemblyArtifact"`
	// Features the Stage needs from its environment.
	// Experimental.
	Host IStageHost `json:"host"`
	// The underlying Pipeline Stage associated with thisCdkStage.
	// Experimental.
	PipelineStage awscodepipeline.IStage `json:"pipelineStage"`
	// Name of the stage that should be created.
	// Experimental.
	StageName *string `json:"stageName"`
}

Construction properties for a CdkStage. Experimental.

type DeployCdkStackAction

type DeployCdkStackAction interface {
	awscodepipeline.IAction
	ActionProperties() *awscodepipeline.ActionProperties
	DependencyStackArtifactIds() *[]*string
	ExecuteRunOrder() *float64
	PrepareRunOrder() *float64
	StackArtifactId() *string
	StackName() *string
	Bind(scope awscdk.Construct, stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	OnStateChange(name *string, target awsevents.IRuleTarget, options *awsevents.RuleProps) awsevents.Rule
}

Action to deploy a CDK Stack.

Adds two CodePipeline Actions to the pipeline: one to create a ChangeSet and one to execute it.

You do not need to instantiate this action yourself -- it will automatically be added by the pipeline when you add stack artifacts or entire stages. Experimental.

func DeployCdkStackAction_FromStackArtifact

func DeployCdkStackAction_FromStackArtifact(scope constructs.Construct, artifact cxapi.CloudFormationStackArtifact, options *CdkStackActionFromArtifactOptions) DeployCdkStackAction

Construct a DeployCdkStackAction from a Stack artifact. Experimental.

func NewDeployCdkStackAction

func NewDeployCdkStackAction(props *DeployCdkStackActionProps) DeployCdkStackAction

Experimental.

type DeployCdkStackActionOptions

type DeployCdkStackActionOptions struct {
	// The CodePipeline artifact that holds the Cloud Assembly.
	// Experimental.
	CloudAssemblyInput awscodepipeline.Artifact `json:"cloudAssemblyInput"`
	// Base name of the action.
	// Experimental.
	BaseActionName *string `json:"baseActionName"`
	// Name of the change set to create and deploy.
	// Experimental.
	ChangeSetName *string `json:"changeSetName"`
	// Run order for the Execute action.
	// Experimental.
	ExecuteRunOrder *float64 `json:"executeRunOrder"`
	// Artifact to write Stack Outputs to.
	// Experimental.
	Output awscodepipeline.Artifact `json:"output"`
	// Filename in output to write Stack outputs to.
	// Experimental.
	OutputFileName *string `json:"outputFileName"`
	// Run order for the Prepare action.
	// Experimental.
	PrepareRunOrder *float64 `json:"prepareRunOrder"`
}

Customization options for a DeployCdkStackAction. Experimental.

type DeployCdkStackActionProps

type DeployCdkStackActionProps struct {
	// The CodePipeline artifact that holds the Cloud Assembly.
	// Experimental.
	CloudAssemblyInput awscodepipeline.Artifact `json:"cloudAssemblyInput"`
	// Base name of the action.
	// Experimental.
	BaseActionName *string `json:"baseActionName"`
	// Name of the change set to create and deploy.
	// Experimental.
	ChangeSetName *string `json:"changeSetName"`
	// Run order for the Execute action.
	// Experimental.
	ExecuteRunOrder *float64 `json:"executeRunOrder"`
	// Artifact to write Stack Outputs to.
	// Experimental.
	Output awscodepipeline.Artifact `json:"output"`
	// Filename in output to write Stack outputs to.
	// Experimental.
	OutputFileName *string `json:"outputFileName"`
	// Run order for the Prepare action.
	// Experimental.
	PrepareRunOrder *float64 `json:"prepareRunOrder"`
	// Role for the action to assume.
	//
	// This controls the account to deploy into
	// Experimental.
	ActionRole awsiam.IRole `json:"actionRole"`
	// The name of the stack that should be created/updated.
	// Experimental.
	StackName *string `json:"stackName"`
	// Relative path of template in the input artifact.
	// Experimental.
	TemplatePath *string `json:"templatePath"`
	// Role to execute CloudFormation under.
	// Experimental.
	CloudFormationExecutionRole awsiam.IRole `json:"cloudFormationExecutionRole"`
	// Artifact ID for the stacks this stack depends on.
	//
	// Used for pipeline order checking.
	// Experimental.
	DependencyStackArtifactIds *[]*string `json:"dependencyStackArtifactIds"`
	// Region to deploy into.
	// Experimental.
	Region *string `json:"region"`
	// Artifact ID for the stack deployed here.
	//
	// Used for pipeline order checking.
	// Experimental.
	StackArtifactId *string `json:"stackArtifactId"`
	// Template configuration path relative to the input artifact.
	// Experimental.
	TemplateConfigurationPath *string `json:"templateConfigurationPath"`
}

Properties for a DeployCdkStackAction. Experimental.

type FromStackArtifactOptions

type FromStackArtifactOptions struct {
	// The CodePipeline artifact that holds the Cloud Assembly.
	// Experimental.
	CloudAssemblyInput awscodepipeline.Artifact `json:"cloudAssemblyInput"`
	// Run order for the Execute action.
	// Experimental.
	ExecuteRunOrder *float64 `json:"executeRunOrder"`
	// Artifact to write Stack Outputs to.
	// Experimental.
	Output awscodepipeline.Artifact `json:"output"`
	// Filename in output to write Stack outputs to.
	// Experimental.
	OutputFileName *string `json:"outputFileName"`
	// Run order for the 2 actions that will be created.
	// Experimental.
	PrepareRunOrder *float64 `json:"prepareRunOrder"`
}

Options for CdkDeployAction.fromStackArtifact. Experimental.

type IStageHost

type IStageHost interface {
	// Make sure all the assets from the given manifest are published.
	// Experimental.
	PublishAsset(command *AssetPublishingCommand)
	// Return the Artifact the given stack has to emit its outputs into, if any.
	// Experimental.
	StackOutputArtifact(stackArtifactId *string) awscodepipeline.Artifact
}

Features that the Stage needs from its environment. Experimental.

type PublishAssetsAction

type PublishAssetsAction interface {
	awscdk.Construct
	awscodepipeline.IAction
	ActionProperties() *awscodepipeline.ActionProperties
	Node() awscdk.ConstructNode
	AddPublishCommand(relativeManifestPath *string, assetSelector *string)
	Bind(scope awscdk.Construct, stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	OnPrepare()
	OnStateChange(name *string, target awsevents.IRuleTarget, options *awsevents.RuleProps) awsevents.Rule
	OnSynthesize(session constructs.ISynthesisSession)
	OnValidate() *[]*string
	Prepare()
	Synthesize(session awscdk.ISynthesisSession)
	ToString() *string
	Validate() *[]*string
}

Action to publish an asset in the pipeline.

Creates a CodeBuild project which will use the CDK CLI to prepare and publish the asset.

You do not need to instantiate this action -- it will automatically be added by the pipeline when you add stacks that use assets. Experimental.

func NewPublishAssetsAction

func NewPublishAssetsAction(scope constructs.Construct, id *string, props *PublishAssetsActionProps) PublishAssetsAction

Experimental.

type PublishAssetsActionProps

type PublishAssetsActionProps struct {
	// Name of publishing action.
	// Experimental.
	ActionName *string `json:"actionName"`
	// AssetType we're publishing.
	// Experimental.
	AssetType AssetType `json:"assetType"`
	// The CodePipeline artifact that holds the Cloud Assembly.
	// Experimental.
	CloudAssemblyInput awscodepipeline.Artifact `json:"cloudAssemblyInput"`
	// Version of CDK CLI to 'npm install'.
	// Experimental.
	CdkCliVersion *string `json:"cdkCliVersion"`
	// Name of the CodeBuild project.
	// Experimental.
	ProjectName *string `json:"projectName"`
	// Role to use for CodePipeline and CodeBuild to build and publish the assets.
	// Experimental.
	Role awsiam.IRole `json:"role"`
	// Which subnets to use.
	//
	// Only used if 'vpc' is supplied.
	// Experimental.
	SubnetSelection *awsec2.SubnetSelection `json:"subnetSelection"`
	// The VPC where to execute the PublishAssetsAction.
	// Experimental.
	Vpc awsec2.IVpc `json:"vpc"`
}

Props for a PublishAssetsAction. Experimental.

type ShellScriptAction

type ShellScriptAction interface {
	awscodepipeline.IAction
	awsiam.IGrantable
	ActionProperties() *awscodepipeline.ActionProperties
	GrantPrincipal() awsiam.IPrincipal
	Project() awscodebuild.IProject
	Bind(scope awscdk.Construct, stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	OnStateChange(name *string, target awsevents.IRuleTarget, options *awsevents.RuleProps) awsevents.Rule
}

Validate a revision using shell commands. Experimental.

func NewShellScriptAction

func NewShellScriptAction(props *ShellScriptActionProps) ShellScriptAction

Experimental.

type ShellScriptActionProps

type ShellScriptActionProps struct {
	// Name of the validation action in the pipeline.
	// Experimental.
	ActionName *string `json:"actionName"`
	// Commands to run.
	// Experimental.
	Commands *[]*string `json:"commands"`
	// Additional artifacts to use as input for the CodeBuild project.
	//
	// You can use these files to load more complex test sets into the
	// shellscript build environment.
	//
	// The files artifact given here will be unpacked into the current
	// working directory, the other ones will be unpacked into directories
	// which are available through the environment variables
	// $CODEBUILD_SRC_DIR_<artifactName>.
	//
	// The CodeBuild job must have at least one input artifact, so you
	// must provide either at least one additional artifact here or one
	// stack output using `useOutput`.
	// Experimental.
	AdditionalArtifacts *[]awscodepipeline.Artifact `json:"additionalArtifacts"`
	// Bash options to set at the start of the script.
	// Experimental.
	BashOptions *string `json:"bashOptions"`
	// The CodeBuild environment where scripts are executed.
	// Experimental.
	Environment *awscodebuild.BuildEnvironment `json:"environment"`
	// Environment variables to send into build.
	// Experimental.
	EnvironmentVariables *map[string]*awscodebuild.BuildEnvironmentVariable `json:"environmentVariables"`
	// Additional policy statements to add to the execution role.
	// Experimental.
	RolePolicyStatements *[]awsiam.PolicyStatement `json:"rolePolicyStatements"`
	// RunOrder for this action.
	//
	// Use this to sequence the shell script after the deployments.
	//
	// The default value is 100 so you don't have to supply the value if you just
	// want to run this after the application stacks have been deployed, and you
	// don't have more than 100 stacks.
	// Experimental.
	RunOrder *float64 `json:"runOrder"`
	// Which security group to associate with the script's project network interfaces.
	//
	// If no security group is identified, one will be created automatically.
	//
	// Only used if 'vpc' is supplied.
	// Experimental.
	SecurityGroups *[]awsec2.ISecurityGroup `json:"securityGroups"`
	// Which subnets to use.
	//
	// Only used if 'vpc' is supplied.
	// Experimental.
	SubnetSelection *awsec2.SubnetSelection `json:"subnetSelection"`
	// Stack outputs to make available as environment variables.
	// Experimental.
	UseOutputs *map[string]StackOutput `json:"useOutputs"`
	// The VPC where to execute the specified script.
	// Experimental.
	Vpc awsec2.IVpc `json:"vpc"`
}

Properties for ShellScriptAction. Experimental.

type SimpleSynthAction

type SimpleSynthAction interface {
	awscodepipeline.IAction
	awsiam.IGrantable
	ActionProperties() *awscodepipeline.ActionProperties
	GrantPrincipal() awsiam.IPrincipal
	Project() awscodebuild.IProject
	Bind(scope awscdk.Construct, stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	OnStateChange(name *string, target awsevents.IRuleTarget, options *awsevents.RuleProps) awsevents.Rule
}

A standard synth with a generated buildspec. Experimental.

func NewSimpleSynthAction

func NewSimpleSynthAction(props *SimpleSynthActionProps) SimpleSynthAction

Experimental.

func SimpleSynthAction_StandardNpmSynth

func SimpleSynthAction_StandardNpmSynth(options *StandardNpmSynthOptions) SimpleSynthAction

Create a standard NPM synth action.

Uses `npm ci` to install dependencies and `npx cdk synth` to synthesize.

If you need a build step, add `buildCommand: 'npm run build'`. Experimental.

func SimpleSynthAction_StandardYarnSynth

func SimpleSynthAction_StandardYarnSynth(options *StandardYarnSynthOptions) SimpleSynthAction

Create a standard Yarn synth action.

Uses `yarn install --frozen-lockfile` to install dependencies and `npx cdk synth` to synthesize.

If you need a build step, add `buildCommand: 'yarn build'`. Experimental.

type SimpleSynthActionProps

type SimpleSynthActionProps struct {
	// The artifact where the CloudAssembly should be emitted.
	// Experimental.
	CloudAssemblyArtifact awscodepipeline.Artifact `json:"cloudAssemblyArtifact"`
	// The source artifact of the CodePipeline.
	// Experimental.
	SourceArtifact awscodepipeline.Artifact `json:"sourceArtifact"`
	// Name of the build action.
	// Experimental.
	ActionName *string `json:"actionName"`
	// 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`.
	// Experimental.
	AdditionalArtifacts *[]*AdditionalArtifact `json:"additionalArtifacts"`
	// Environment variables to copy over from parent env.
	//
	// These are environment variables that are being used by the build.
	// Experimental.
	CopyEnvironmentVariables *[]*string `json:"copyEnvironmentVariables"`
	// Build environment to use for CodeBuild job.
	// Experimental.
	Environment *awscodebuild.BuildEnvironment `json:"environment"`
	// Environment variables to send into build.
	// Experimental.
	EnvironmentVariables *map[string]*awscodebuild.BuildEnvironmentVariable `json:"environmentVariables"`
	// Name of the CodeBuild project.
	// Experimental.
	ProjectName *string `json:"projectName"`
	// Policy statements to add to role used during the synth.
	//
	// Can be used to add acces to a CodeArtifact repository etc.
	// Experimental.
	RolePolicyStatements *[]awsiam.PolicyStatement `json:"rolePolicyStatements"`
	// Directory inside the source where package.json and cdk.json are located.
	// Experimental.
	Subdirectory *string `json:"subdirectory"`
	// Which subnets to use.
	//
	// Only used if 'vpc' is supplied.
	// Experimental.
	SubnetSelection *awsec2.SubnetSelection `json:"subnetSelection"`
	// The VPC where to execute the SimpleSynth.
	// Experimental.
	Vpc awsec2.IVpc `json:"vpc"`
	// The synth command.
	// Experimental.
	SynthCommand *string `json:"synthCommand"`
	// The build command.
	//
	// If your programming language requires a compilation step, put the
	// compilation command here.
	// Deprecated: Use `buildCommands` instead
	BuildCommand *string `json:"buildCommand"`
	// The build commands.
	//
	// If your programming language requires a compilation step, put the
	// compilation command here.
	// Experimental.
	BuildCommands *[]*string `json:"buildCommands"`
	// The install command.
	//
	// If not provided by the build image or another dependency
	// management tool, at least install the CDK CLI here using
	// `npm install -g aws-cdk`.
	// Deprecated: Use `installCommands` instead
	InstallCommand *string `json:"installCommand"`
	// Install commands.
	//
	// If not provided by the build image or another dependency
	// management tool, at least install the CDK CLI here using
	// `npm install -g aws-cdk`.
	// Experimental.
	InstallCommands *[]*string `json:"installCommands"`
	// Test commands.
	//
	// These commands are run after the build commands but before the
	// synth command.
	// Experimental.
	TestCommands *[]*string `json:"testCommands"`
}

Construction props for SimpleSynthAction. Experimental.

type SimpleSynthOptions

type SimpleSynthOptions struct {
	// The artifact where the CloudAssembly should be emitted.
	// Experimental.
	CloudAssemblyArtifact awscodepipeline.Artifact `json:"cloudAssemblyArtifact"`
	// The source artifact of the CodePipeline.
	// Experimental.
	SourceArtifact awscodepipeline.Artifact `json:"sourceArtifact"`
	// Name of the build action.
	// Experimental.
	ActionName *string `json:"actionName"`
	// 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`.
	// Experimental.
	AdditionalArtifacts *[]*AdditionalArtifact `json:"additionalArtifacts"`
	// Environment variables to copy over from parent env.
	//
	// These are environment variables that are being used by the build.
	// Experimental.
	CopyEnvironmentVariables *[]*string `json:"copyEnvironmentVariables"`
	// Build environment to use for CodeBuild job.
	// Experimental.
	Environment *awscodebuild.BuildEnvironment `json:"environment"`
	// Environment variables to send into build.
	// Experimental.
	EnvironmentVariables *map[string]*awscodebuild.BuildEnvironmentVariable `json:"environmentVariables"`
	// Name of the CodeBuild project.
	// Experimental.
	ProjectName *string `json:"projectName"`
	// Policy statements to add to role used during the synth.
	//
	// Can be used to add acces to a CodeArtifact repository etc.
	// Experimental.
	RolePolicyStatements *[]awsiam.PolicyStatement `json:"rolePolicyStatements"`
	// Directory inside the source where package.json and cdk.json are located.
	// Experimental.
	Subdirectory *string `json:"subdirectory"`
	// Which subnets to use.
	//
	// Only used if 'vpc' is supplied.
	// Experimental.
	SubnetSelection *awsec2.SubnetSelection `json:"subnetSelection"`
	// The VPC where to execute the SimpleSynth.
	// Experimental.
	Vpc awsec2.IVpc `json:"vpc"`
}

Configuration options for a SimpleSynth. Experimental.

type StackOutput

type StackOutput interface {
	ArtifactFile() awscodepipeline.ArtifactPath
	OutputName() *string
}

A single output of a Stack. Experimental.

func NewStackOutput

func NewStackOutput(artifactFile awscodepipeline.ArtifactPath, outputName *string) StackOutput

Build a StackOutput from a known artifact and an output name. Experimental.

type StandardNpmSynthOptions

type StandardNpmSynthOptions struct {
	// The artifact where the CloudAssembly should be emitted.
	// Experimental.
	CloudAssemblyArtifact awscodepipeline.Artifact `json:"cloudAssemblyArtifact"`
	// The source artifact of the CodePipeline.
	// Experimental.
	SourceArtifact awscodepipeline.Artifact `json:"sourceArtifact"`
	// Name of the build action.
	// Experimental.
	ActionName *string `json:"actionName"`
	// 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`.
	// Experimental.
	AdditionalArtifacts *[]*AdditionalArtifact `json:"additionalArtifacts"`
	// Environment variables to copy over from parent env.
	//
	// These are environment variables that are being used by the build.
	// Experimental.
	CopyEnvironmentVariables *[]*string `json:"copyEnvironmentVariables"`
	// Build environment to use for CodeBuild job.
	// Experimental.
	Environment *awscodebuild.BuildEnvironment `json:"environment"`
	// Environment variables to send into build.
	// Experimental.
	EnvironmentVariables *map[string]*awscodebuild.BuildEnvironmentVariable `json:"environmentVariables"`
	// Name of the CodeBuild project.
	// Experimental.
	ProjectName *string `json:"projectName"`
	// Policy statements to add to role used during the synth.
	//
	// Can be used to add acces to a CodeArtifact repository etc.
	// Experimental.
	RolePolicyStatements *[]awsiam.PolicyStatement `json:"rolePolicyStatements"`
	// Directory inside the source where package.json and cdk.json are located.
	// Experimental.
	Subdirectory *string `json:"subdirectory"`
	// Which subnets to use.
	//
	// Only used if 'vpc' is supplied.
	// Experimental.
	SubnetSelection *awsec2.SubnetSelection `json:"subnetSelection"`
	// The VPC where to execute the SimpleSynth.
	// Experimental.
	Vpc awsec2.IVpc `json:"vpc"`
	// 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`.
	// Experimental.
	BuildCommand *string `json:"buildCommand"`
	// The install command.
	// Experimental.
	InstallCommand *string `json:"installCommand"`
	// The synth command.
	// Experimental.
	SynthCommand *string `json:"synthCommand"`
}

Options for a convention-based synth using NPM. Experimental.

type StandardYarnSynthOptions

type StandardYarnSynthOptions struct {
	// The artifact where the CloudAssembly should be emitted.
	// Experimental.
	CloudAssemblyArtifact awscodepipeline.Artifact `json:"cloudAssemblyArtifact"`
	// The source artifact of the CodePipeline.
	// Experimental.
	SourceArtifact awscodepipeline.Artifact `json:"sourceArtifact"`
	// Name of the build action.
	// Experimental.
	ActionName *string `json:"actionName"`
	// 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`.
	// Experimental.
	AdditionalArtifacts *[]*AdditionalArtifact `json:"additionalArtifacts"`
	// Environment variables to copy over from parent env.
	//
	// These are environment variables that are being used by the build.
	// Experimental.
	CopyEnvironmentVariables *[]*string `json:"copyEnvironmentVariables"`
	// Build environment to use for CodeBuild job.
	// Experimental.
	Environment *awscodebuild.BuildEnvironment `json:"environment"`
	// Environment variables to send into build.
	// Experimental.
	EnvironmentVariables *map[string]*awscodebuild.BuildEnvironmentVariable `json:"environmentVariables"`
	// Name of the CodeBuild project.
	// Experimental.
	ProjectName *string `json:"projectName"`
	// Policy statements to add to role used during the synth.
	//
	// Can be used to add acces to a CodeArtifact repository etc.
	// Experimental.
	RolePolicyStatements *[]awsiam.PolicyStatement `json:"rolePolicyStatements"`
	// Directory inside the source where package.json and cdk.json are located.
	// Experimental.
	Subdirectory *string `json:"subdirectory"`
	// Which subnets to use.
	//
	// Only used if 'vpc' is supplied.
	// Experimental.
	SubnetSelection *awsec2.SubnetSelection `json:"subnetSelection"`
	// The VPC where to execute the SimpleSynth.
	// Experimental.
	Vpc awsec2.IVpc `json:"vpc"`
	// 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`.
	// Experimental.
	BuildCommand *string `json:"buildCommand"`
	// The install command.
	// Experimental.
	InstallCommand *string `json:"installCommand"`
	// The synth command.
	// Experimental.
	SynthCommand *string `json:"synthCommand"`
}

Options for a convention-based synth using Yarn. Experimental.

type UpdatePipelineAction

type UpdatePipelineAction interface {
	awscdk.Construct
	awscodepipeline.IAction
	ActionProperties() *awscodepipeline.ActionProperties
	Node() awscdk.ConstructNode
	Bind(scope awscdk.Construct, stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
	OnPrepare()
	OnStateChange(name *string, target awsevents.IRuleTarget, options *awsevents.RuleProps) awsevents.Rule
	OnSynthesize(session constructs.ISynthesisSession)
	OnValidate() *[]*string
	Prepare()
	Synthesize(session awscdk.ISynthesisSession)
	ToString() *string
	Validate() *[]*string
}

Action to self-mutate the pipeline.

Creates a CodeBuild project which will use the CDK CLI to deploy the pipeline stack.

You do not need to instantiate this action -- it will automatically be added by the pipeline. Experimental.

func NewUpdatePipelineAction

func NewUpdatePipelineAction(scope constructs.Construct, id *string, props *UpdatePipelineActionProps) UpdatePipelineAction

Experimental.

type UpdatePipelineActionProps

type UpdatePipelineActionProps struct {
	// The CodePipeline artifact that holds the Cloud Assembly.
	// Experimental.
	CloudAssemblyInput awscodepipeline.Artifact `json:"cloudAssemblyInput"`
	// Name of the pipeline stack.
	// Experimental.
	PipelineStackName *string `json:"pipelineStackName"`
	// Version of CDK CLI to 'npm install'.
	// Experimental.
	CdkCliVersion *string `json:"cdkCliVersion"`
	// Name of the CodeBuild project.
	// Experimental.
	ProjectName *string `json:"projectName"`
}

Props for the UpdatePipelineAction. Experimental.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL