interface ProduceActionOptions
Language | Type name |
---|---|
![]() | Amazon.CDK.Pipelines.ProduceActionOptions |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/pipelines#ProduceActionOptions |
![]() | software.amazon.awscdk.pipelines.ProduceActionOptions |
![]() | aws_cdk.pipelines.ProduceActionOptions |
![]() | aws-cdk-lib » pipelines » ProduceActionOptions |
Options for the CodePipelineActionFactory.produce()
method.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_codebuild as codebuild } from 'aws-cdk-lib';
import { aws_codepipeline as codepipeline } from 'aws-cdk-lib';
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
import { aws_iam as iam } from 'aws-cdk-lib';
import { aws_logs as logs } from 'aws-cdk-lib';
import { aws_s3 as s3 } from 'aws-cdk-lib';
import { pipelines } from 'aws-cdk-lib';
import * as constructs from 'constructs';
declare const artifact: codepipeline.Artifact;
declare const artifactMap: pipelines.ArtifactMap;
declare const bucket: s3.Bucket;
declare const buildImage: codebuild.IBuildImage;
declare const buildSpec: codebuild.BuildSpec;
declare const cache: codebuild.Cache;
declare const codePipeline: pipelines.CodePipeline;
declare const construct: constructs.Construct;
declare const fileSystemLocation: codebuild.IFileSystemLocation;
declare const fleet: codebuild.Fleet;
declare const logGroup: logs.LogGroup;
declare const policyStatement: iam.PolicyStatement;
declare const securityGroup: ec2.SecurityGroup;
declare const stackOutputsMap: pipelines.StackOutputsMap;
declare const subnet: ec2.Subnet;
declare const subnetFilter: ec2.SubnetFilter;
declare const value: any;
declare const vpc: ec2.Vpc;
const produceActionOptions: pipelines.ProduceActionOptions = {
actionName: 'actionName',
artifacts: artifactMap,
pipeline: codePipeline,
runOrder: 123,
scope: construct,
stackOutputsMap: stackOutputsMap,
// the properties below are optional
beforeSelfMutation: false,
codeBuildDefaults: {
buildEnvironment: {
buildImage: buildImage,
certificate: {
bucket: bucket,
objectKey: 'objectKey',
},
computeType: codebuild.ComputeType.SMALL,
environmentVariables: {
environmentVariablesKey: {
value: value,
// the properties below are optional
type: codebuild.BuildEnvironmentVariableType.PLAINTEXT,
},
},
fleet: fleet,
privileged: false,
},
cache: cache,
fileSystemLocations: [fileSystemLocation],
logging: {
cloudWatch: {
enabled: false,
logGroup: logGroup,
prefix: 'prefix',
},
s3: {
bucket: bucket,
// the properties below are optional
enabled: false,
encrypted: false,
prefix: 'prefix',
},
},
partialBuildSpec: buildSpec,
rolePolicy: [policyStatement],
securityGroups: [securityGroup],
subnetSelection: {
availabilityZones: ['availabilityZones'],
onePerAz: false,
subnetFilters: [subnetFilter],
subnetGroupName: 'subnetGroupName',
subnets: [subnet],
subnetType: ec2.SubnetType.PRIVATE_ISOLATED,
},
timeout: cdk.Duration.minutes(30),
vpc: vpc,
},
fallbackArtifact: artifact,
variablesNamespace: 'variablesNamespace',
};
Properties
Name | Type | Description |
---|---|---|
action | string | Name the action should get. |
artifacts | Artifact | Helper object to translate FileSets to CodePipeline Artifacts. |
pipeline | Code | The pipeline the action is being generated for. |
run | number | RunOrder the action should get. |
scope | Construct | Scope in which to create constructs. |
stack | Stack | Helper object to produce variables exported from stack deployments. |
before | boolean | Whether or not this action is inserted before self mutation. |
code | Code | If this action factory creates a CodeBuild step, default options to inherit. |
fallback | Artifact | An input artifact that CodeBuild projects that don't actually need an input artifact can use. |
variables | string | If this step is producing outputs, the variables namespace assigned to it. |
actionName
Type:
string
Name the action should get.
artifacts
Type:
Artifact
Helper object to translate FileSets to CodePipeline Artifacts.
pipeline
Type:
Code
The pipeline the action is being generated for.
runOrder
Type:
number
RunOrder the action should get.
scope
Type:
Construct
Scope in which to create constructs.
stackOutputsMap
Type:
Stack
Helper object to produce variables exported from stack deployments.
If your step references outputs from a stack deployment, use this to map the output references to Codepipeline variable names.
Note - Codepipeline variables can only be referenced in action configurations.
beforeSelfMutation?
Type:
boolean
(optional, default: false)
Whether or not this action is inserted before self mutation.
If it is, the action should take care to reflect some part of its own definition in the pipeline action definition, to trigger a restart after self-mutation (if necessary).
codeBuildDefaults?
Type:
Code
(optional, default: No CodeBuild project defaults)
If this action factory creates a CodeBuild step, default options to inherit.
fallbackArtifact?
Type:
Artifact
(optional, default: A fallback artifact does not exist)
An input artifact that CodeBuild projects that don't actually need an input artifact can use.
CodeBuild Projects MUST have an input artifact in order to be added to the Pipeline. If the Project doesn't actually care about its input (it can be anything), it can use the Artifact passed here.
variablesNamespace?
Type:
string
(optional, default: Step doesn't produce any outputs)
If this step is producing outputs, the variables namespace assigned to it.
Pass this on to the Action you are creating.