class ShellScriptAction
Language | Type name |
---|---|
![]() | Amazon.CDK.Pipelines.ShellScriptAction |
![]() | software.amazon.awscdk.pipelines.ShellScriptAction |
![]() | aws_cdk.pipelines.ShellScriptAction |
![]() | @aws-cdk/pipelines » ShellScriptAction |
⚠️ Deprecated: This class is part of the old API. Use the API based on the CodePipeline
class instead
Implements
IAction
, IGrantable
Validate a revision using shell commands.
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 pipelines from '@aws-cdk/pipelines';
declare const artifact: codepipeline.Artifact;
declare const bucket: s3.Bucket;
declare const buildImage: codebuild.IBuildImage;
declare const policyStatement: iam.PolicyStatement;
declare const securityGroup: ec2.SecurityGroup;
declare const stackOutput: pipelines.StackOutput;
declare const subnet: ec2.Subnet;
declare const subnetFilter: ec2.SubnetFilter;
declare const value: any;
declare const vpc: ec2.Vpc;
const shellScriptAction = new pipelines.ShellScriptAction({
actionName: 'actionName',
commands: ['commands'],
// the properties below are optional
additionalArtifacts: [artifact],
bashOptions: 'bashOptions',
environment: {
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,
},
environmentVariables: {
environmentVariablesKey: {
value: value,
// the properties below are optional
type: codebuild.BuildEnvironmentVariableType.PLAINTEXT,
},
},
rolePolicyStatements: [policyStatement],
runOrder: 123,
securityGroups: [securityGroup],
subnetSelection: {
availabilityZones: ['availabilityZones'],
onePerAz: false,
subnetFilters: [subnetFilter],
subnetGroupName: 'subnetGroupName',
subnetName: 'subnetName',
subnets: [subnet],
subnetType: ec2.SubnetType.ISOLATED,
},
useOutputs: {
useOutputsKey: stackOutput,
},
vpc: vpc,
});
Initializer
new ShellScriptAction(props: ShellScriptActionProps)
⚠️ Deprecated: This class is part of the old API. Use the API based on the CodePipeline
class instead
Parameters
- props
Shell
Script Action Props
Properties
Name | Type | Description |
---|---|---|
action | Action | Exists to implement IAction. |
grant | IPrincipal | The CodeBuild Project's principal. |
project | IProject | Project generated to run the shell script in. |
actionProperties
⚠️ Deprecated: This class is part of the old API. Use the API based on the CodePipeline
class instead
Type:
Action
Exists to implement IAction.
grantPrincipal
⚠️ Deprecated: This class is part of the old API. Use the API based on the CodePipeline
class instead
Type:
IPrincipal
The CodeBuild Project's principal.
project
⚠️ Deprecated: This class is part of the old API. Use the API based on the CodePipeline
class instead
Type:
IProject
Project generated to run the shell script in.
Methods
Name | Description |
---|---|
bind(scope, stage, options) | Exists to implement IAction. |
on | Exists to implement IAction. |
bind(scope, stage, options)
public bind(scope: Construct, stage: IStage, options: ActionBindOptions): ActionConfig
⚠️ Deprecated: This class is part of the old API. Use the API based on the CodePipeline
class instead
Parameters
- scope
Construct
- stage
IStage
- options
Action
Bind Options
Returns
Exists to implement IAction.
onStateChange(name, target?, options?)
public onStateChange(name: string, target?: IRuleTarget, options?: RuleProps): Rule
⚠️ Deprecated: This class is part of the old API. Use the API based on the CodePipeline
class instead
Parameters
- name
string
- target
IRule
Target - options
Rule
Props
Returns
Exists to implement IAction.