@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:42.943Z") @Stability(value=Stable) public class ShellStep extends Step
This is a generic step designed to be deployment engine agnostic.
Example:
Pipeline codePipeline;
CodePipeline pipeline = CodePipeline.Builder.create(this, "Pipeline")
.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())
.codePipeline(codePipeline)
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
ShellStep.Builder
A fluent builder for
ShellStep. |
software.amazon.jsii.JsiiObject.InitializationModeIFileSetProducer.Jsii$Default| Modifier | Constructor and Description |
|---|---|
protected |
ShellStep(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
ShellStep(software.amazon.jsii.JsiiObjectRef objRef) |
|
ShellStep(String id,
ShellStepProps props) |
| Modifier and Type | Method and Description |
|---|---|
FileSet |
addOutputDirectory(String directory)
Add an additional output FileSet based on a directory.
|
List<String> |
getCommands()
Commands to run.
|
Map<String,String> |
getEnv()
Environment variables to set.
|
Map<String,StackOutputReference> |
getEnvFromCfnOutputs()
Set environment variables based on Stack Outputs.
|
List<FileSetLocation> |
getInputs()
Input FileSets.
|
List<String> |
getInstallCommands()
Installation commands to run before the regular commands.
|
List<FileSetLocation> |
getOutputs()
Output FileSets.
|
FileSet |
primaryOutputDirectory(String directory)
Configure the given output directory as primary output.
|
addDependencyFileSet, addStepDependency, configurePrimaryOutput, discoverReferencedOutputs, getDependencies, getDependencyFileSets, getId, getIsSource, getPrimaryOutput, sequence, toStringjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected ShellStep(software.amazon.jsii.JsiiObjectRef objRef)
protected ShellStep(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public ShellStep(@NotNull
String id,
@NotNull
ShellStepProps props)
id - This parameter is required.props - This parameter is required.@Stability(value=Stable) @NotNull public FileSet addOutputDirectory(@NotNull String directory)
After running the script, the contents of the given directory
will be exported as a FileSet. Use the FileSet as the
input to another step.
Multiple calls with the exact same directory name string (not normalized) will return the same FileSet.
directory - This parameter is required.@Stability(value=Stable) @NotNull public FileSet primaryOutputDirectory(@NotNull String directory)
If no primary output has been configured yet, this directory will become the primary output of this ShellStep, otherwise this method will throw if the given directory is different than the currently configured primary output directory.
directory - This parameter is required.@Stability(value=Stable) @NotNull public Map<String,String> getEnv()
Default: - No environment variables
@Stability(value=Stable) @NotNull public Map<String,StackOutputReference> getEnvFromCfnOutputs()
Default: - No environment variables created from stack outputs
@Stability(value=Stable) @NotNull public List<FileSetLocation> getInputs()
A list of (FileSet, directory) pairs, which are a copy of the
input properties. This list should not be modified directly.
@Stability(value=Stable) @NotNull public List<String> getInstallCommands()
For deployment engines that support it, install commands will be classified
differently in the job history from the regular commands.
Default: - No installation commands
@Stability(value=Stable) @NotNull public List<FileSetLocation> getOutputs()
A list of (FileSet, directory) pairs, which are a copy of the
input properties. This list should not be modified directly.
Copyright © 2022. All rights reserved.