pipelines

package
v1.112.0-devpreview Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2021 License: Apache-2.0 Imports: 14 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 NewDockerCredential_Override

func NewDockerCredential_Override(d DockerCredential, usages *[]DockerCredentialUsage)

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"`
	// ARN of the IAM Role used to publish this asset.
	// Experimental.
	AssetPublishingRoleArn *string `json:"assetPublishingRoleArn"`
	// 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"`
	// Additional commands to run before installing cdk-assets during the asset publishing step Use this to setup proxies or npm mirrors.
	// Experimental.
	AssetPreInstallCommands *[]*string `json:"assetPreInstallCommands"`
	// 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"`
	// A list of credentials used to authenticate to Docker registries.
	//
	// Specify any credentials necessary within the pipeline to build, synth, update, or publish assets.
	// Experimental.
	DockerCredentials *[]DockerCredential `json:"dockerCredentials"`
	// 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"`
	// Whether this pipeline creates one asset upload action per asset type or one asset upload per asset.
	// Experimental.
	SinglePublisherPerType *bool `json:"singlePublisherPerType"`
	// 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"`
	// Whether the pipeline needs to build Docker images in the UpdatePipeline stage.
	//
	// If the UpdatePipeline stage tries to build a Docker image and this flag is not
	// set to `true`, the build step will run in non-privileged mode and consequently
	// will fail with a message like:
	//
	// > Cannot connect to the Docker daemon at unix:///var/run/docker.sock.
	// > Is the docker daemon running?
	//
	// This flag has an effect only if `selfMutating` is also `true`.
	// Experimental.
	SupportDockerAssets *bool `json:"supportDockerAssets"`
	// 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 DockerCredential

type DockerCredential interface {
	Usages() *[]DockerCredentialUsage
	GrantRead(grantee awsiam.IGrantable, usage DockerCredentialUsage)
}

Represents credentials used to access a Docker registry. Experimental.

func DockerCredential_CustomRegistry

func DockerCredential_CustomRegistry(registryDomain *string, secret awssecretsmanager.ISecret, opts *ExternalDockerCredentialOptions) DockerCredential

Creates a DockerCredential for a registry, based on its domain name (e.g., 'www.example.com'). Experimental.

func DockerCredential_DockerHub

func DockerCredential_DockerHub(secret awssecretsmanager.ISecret, opts *ExternalDockerCredentialOptions) DockerCredential

Creates a DockerCredential for DockerHub.

Convenience method for `fromCustomRegistry('index.docker.io', opts)`. Experimental.

func DockerCredential_Ecr

func DockerCredential_Ecr(repositories *[]awsecr.IRepository, opts *EcrDockerCredentialOptions) DockerCredential

Creates a DockerCredential for one or more ECR repositories.

NOTE - All ECR repositories in the same account and region share a domain name (e.g., 0123456789012.dkr.ecr.eu-west-1.amazonaws.com), and can only have one associated set of credentials (and DockerCredential). Attempting to associate one set of credentials with one ECR repo and another with another ECR repo in the same account and region will result in failures when using these credentials in the pipeline. Experimental.

type DockerCredentialUsage

type DockerCredentialUsage string

Defines which stages of a pipeline require the specified credentials. Experimental.

const (
	DockerCredentialUsage_SYNTH            DockerCredentialUsage = "SYNTH"
	DockerCredentialUsage_SELF_UPDATE      DockerCredentialUsage = "SELF_UPDATE"
	DockerCredentialUsage_ASSET_PUBLISHING DockerCredentialUsage = "ASSET_PUBLISHING"
)

type EcrDockerCredentialOptions

type EcrDockerCredentialOptions struct {
	// An IAM role to assume prior to accessing the secret.
	// Experimental.
	AssumeRole awsiam.IRole `json:"assumeRole"`
	// Defines which stages of the pipeline should be granted access to these credentials.
	// Experimental.
	Usages *[]DockerCredentialUsage `json:"usages"`
}

Options for defining access for a Docker Credential composed of ECR repos. Experimental.

type ExternalDockerCredentialOptions

type ExternalDockerCredentialOptions struct {
	// An IAM role to assume prior to accessing the secret.
	// Experimental.
	AssumeRole awsiam.IRole `json:"assumeRole"`
	// The name of the JSON field of the secret which contains the secret/password.
	// Experimental.
	SecretPasswordField *string `json:"secretPasswordField"`
	// The name of the JSON field of the secret which contains the user/login name.
	// Experimental.
	SecretUsernameField *string `json:"secretUsernameField"`
	// Defines which stages of the pipeline should be granted access to these credentials.
	// Experimental.
	Usages *[]DockerCredentialUsage `json:"usages"`
}

Options for defining credentials for a Docker Credential. 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"`
	// Use a file buildspec written to the cloud assembly instead of an inline buildspec.
	//
	// This prevents size limitation errors as inline specs have a max length of 25600 characters
	// Experimental.
	CreateBuildspecFile *bool `json:"createBuildspecFile"`
	// Any Dependable construct that the CodeBuild project needs to take a dependency on.
	// Experimental.
	Dependable awscdk.IDependable `json:"dependable"`
	// Additional commands to run before installing cdk-assert Use this to setup proxies or npm mirrors.
	// Experimental.
	PreInstallCommands *[]*string `json:"preInstallCommands"`
	// 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.
	//
	// 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.
	// 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.
	//
	// 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.
	// 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.
	//
	// 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.
	// 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"`
	// Test commands.
	//
	// These commands are run after the build commands but before the
	// synth command.
	// Experimental.
	TestCommands *[]*string `json:"testCommands"`
}

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.
	//
	// 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.
	// 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"`
	// Test commands.
	//
	// These commands are run after the build commands but before the
	// synth command.
	// Experimental.
	TestCommands *[]*string `json:"testCommands"`
}

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"`
	// Hierarchical id of the pipeline stack.
	// Experimental.
	PipelineStackHierarchicalId *string `json:"pipelineStackHierarchicalId"`
	// Version of CDK CLI to 'npm install'.
	// Experimental.
	CdkCliVersion *string `json:"cdkCliVersion"`
	// Docker registries and associated credentials necessary during the pipeline self-update stage.
	// Experimental.
	DockerCredentials *[]DockerCredential `json:"dockerCredentials"`
	// Name of the pipeline stack.
	// Deprecated: - Use `pipelineStackHierarchicalId` instead.
	PipelineStackName *string `json:"pipelineStackName"`
	// Whether the build step should run in privileged mode.
	// Experimental.
	Privileged *bool `json:"privileged"`
	// 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