interface ProduceActionOptions
Language | Type name |
---|---|
![]() | Amazon.CDK.Pipelines.ProduceActionOptions |
![]() | software.amazon.awscdk.pipelines.ProduceActionOptions |
![]() | aws_cdk.pipelines.ProduceActionOptions |
![]() | @aws-cdk/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 codebuild from '@aws-cdk/aws-codebuild';
import * as codepipeline from '@aws-cdk/aws-codepipeline';
import * as ec2 from '@aws-cdk/aws-ec2';
import * as iam from '@aws-cdk/aws-iam';
import * as s3 from '@aws-cdk/aws-s3';
import * as cdk from '@aws-cdk/core';
import * as pipelines from '@aws-cdk/pipelines';
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 codePipeline: pipelines.CodePipeline;
declare const construct: constructs.Construct;
declare const policyStatement: iam.PolicyStatement;
declare const securityGroup: ec2.SecurityGroup;
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,
// 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,
},
},
privileged: false,
},
partialBuildSpec: buildSpec,
rolePolicy: [policyStatement],
securityGroups: [securityGroup],
subnetSelection: {
availabilityZones: ['availabilityZones'],
onePerAz: false,
subnetFilters: [subnetFilter],
subnetGroupName: 'subnetGroupName',
subnetName: 'subnetName',
subnets: [subnet],
subnetType: ec2.SubnetType.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. |
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.
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.