CommandsActionProps Struct
Construction properties of the CommandsAction.
Example
declare const sourceArtifact: codepipeline.Artifact;
declare const outputArtifact: codepipeline.Artifact;
const commandsAction = new codepipeline_actions.CommandsAction({
actionName: 'Commands',
commands: [
'export MY_OUTPUT=my-key',
],
input: sourceArtifact,
output: outputArtifact,
outputVariables: ['MY_OUTPUT', 'CODEBUILD_BUILD_ID'], // CODEBUILD_BUILD_ID is a variable defined by CodeBuild
});
// Deploy action
const deployAction = new codepipeline_actions.S3DeployAction({
actionName: 'DeployAction',
extract: true,
input: outputArtifact,
bucket: new s3.Bucket(this, 'DeployBucket'),
objectKey: commandsAction.variable('MY_OUTPUT'), // the variable emitted by the Commands action
});
Properties
Note that Action names must be unique within a single Stage.
commandsstring[]commandstyping.List[str]commandsList<String>Commandsstring[]Commands*[]*stringrequired#All formats are supported except multi-line formats.
The length of the commands array must be between 1 and 50.
extraInputsoptionalArtifact[]extra_inputsoptionaltyping.List[Artifact]extraInputsoptionalList<Artifact>ExtraInputsoptionalArtifact[]ExtraInputsoptional*[]Artifact#Default: no extra inputs
outputoptionalArtifactoutputoptionalArtifactoutputoptionalArtifactOutputoptionalArtifactOutputoptionalArtifact#Default: no output artifact
You can filter files that you want to export as the output artifact for the action.
example
new codepipeline.Artifact('CommandsArtifact', ['my-dir/**']);
outputVariablesoptionalstring[]output_variablesoptionaltyping.List[str]outputVariablesoptionalList<String>OutputVariablesoptionalstring[]OutputVariablesoptional*[]*string#Default: No output variables are exported
These variables can be referenced in other actions by using the variable method of this class.
Default: a new Role will be generated
notes
The Pipeline's Role will assume this Role (the required permissions for that will be granted automatically) right before executing this Action. This Action will be passed into your IAction.bind method in the ActionBindOptions.role property.
runOrderoptionalnumberrun_orderoptionalint | floatrunOrderoptionalNumberRunOrderoptionaldoubleRunOrderoptional*float64= 1#RunOrder determines the relative order in which multiple Actions in the same Stage execute.
variablesNamespaceoptionalstringvariables_namespaceoptionalstrvariablesNamespaceoptionalStringVariablesNamespaceoptionalstringVariablesNamespaceoptional*string#Default: a name will be generated, based on the stage and action names, if any of the action's variables were referenced - otherwise, no namespace will be set