Interface ShellStepProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
CodeBuildStepProps
- All Known Implementing Classes:
CodeBuildStepProps.Jsii$Proxy
,ShellStepProps.Jsii$Proxy
ShellStep
.
Example:
// Modern API CodePipeline modernPipeline = CodePipeline.Builder.create(this, "Pipeline") .selfMutation(false) .synth(ShellStep.Builder.create("Synth") .input(CodePipelineSource.connection("my-org/my-app", "main", ConnectionSourceOptions.builder() .connectionArn("arn:aws:codestar-connections:us-east-1:222222222222:connection/7d2469ff-514a-4e4f-9003-5ca4a43cdc41") .build())) .commands(List.of("npm ci", "npm run build", "npx cdk synth")) .build()) .build(); // Original API Artifact cloudAssemblyArtifact = new Artifact(); CdkPipeline originalPipeline = new CdkPipeline(this, "Pipeline", new CdkPipelineProps() .selfMutating(false) .cloudAssemblyArtifact(cloudAssemblyArtifact) );
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final class
A builder forShellStepProps
static final class
An implementation forShellStepProps
-
Method Summary
Modifier and TypeMethodDescriptionstatic ShellStepProps.Builder
builder()
default Map<String,
IFileSetProducer> Additional FileSets to put in other directories.Commands to run.getEnv()
Environment variables to set.Set environment variables based on Stack Outputs.default IFileSetProducer
getInput()
FileSet to run these scripts on.Installation commands to run before the regular commands.default String
The directory that will contain the primary output fileset.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getCommands
Commands to run. -
getAdditionalInputs
Additional FileSets to put in other directories.Specifies a mapping from directory name to FileSets. During the script execution, the FileSets will be available in the directories indicated.
The directory names may be relative. For example, you can put the main input and an additional input side-by-side with the following configuration:
ShellStep script = ShellStep.Builder.create("MainScript") .commands(List.of("npm ci", "npm run build", "npx cdk synth")) .input(CodePipelineSource.gitHub("org/source1", "main")) .additionalInputs(Map.of( "../siblingdir", CodePipelineSource.gitHub("org/source2", "main"))) .build();
Default: - No additional inputs
-
getEnv
Environment variables to set.Default: - No environment variables
-
getEnvFromCfnOutputs
Set environment variables based on Stack Outputs.ShellStep
s following stack or stage deployments may access theCfnOutput
s of those stacks to get access to --for example--automatically generated resource names or endpoint URLs.Default: - No environment variables created from stack outputs
-
getInput
FileSet to run these scripts on.The files in the FileSet will be placed in the working directory when the script is executed. Use
additionalInputs
to download file sets to other directories as well.Default: - No input specified
-
getInstallCommands
Installation commands to run before the regular commands.For deployment engines that support it, install commands will be classified differently in the job history from the regular
commands
.Default: - No installation commands
-
getPrimaryOutputDirectory
The directory that will contain the primary output fileset.After running the script, the contents of the given directory will be treated as the primary output of this Step.
Default: - No primary output
-
builder
- Returns:
- a
ShellStepProps.Builder
ofShellStepProps
-