@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:42.944Z") @Stability(value=Stable) public interface ShellStepProps extends software.amazon.jsii.JsiiSerializable
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 | Interface and Description |
|---|---|
static class |
ShellStepProps.Builder
A builder for
ShellStepProps |
static class |
ShellStepProps.Jsii$Proxy
An implementation for
ShellStepProps |
| Modifier and Type | Method and Description |
|---|---|
static ShellStepProps.Builder |
builder() |
default Map<String,IFileSetProducer> |
getAdditionalInputs()
Additional FileSets to put in other directories.
|
List<String> |
getCommands()
Commands to run.
|
default Map<String,String> |
getEnv()
Environment variables to set.
|
default Map<String,CfnOutput> |
getEnvFromCfnOutputs()
Set environment variables based on Stack Outputs.
|
default IFileSetProducer |
getInput()
FileSet to run these scripts on.
|
default List<String> |
getInstallCommands()
Installation commands to run before the regular commands.
|
default String |
getPrimaryOutputDirectory()
The directory that will contain the primary output fileset.
|
@Stability(value=Stable) @Nullable default Map<String,IFileSetProducer> getAdditionalInputs()
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
@Stability(value=Stable) @Nullable default Map<String,String> getEnv()
Default: - No environment variables
@Stability(value=Stable) @Nullable default Map<String,CfnOutput> getEnvFromCfnOutputs()
ShellSteps following stack or stage deployments may
access the CfnOutputs of those stacks to get access to
--for example--automatically generated resource names or
endpoint URLs.
Default: - No environment variables created from stack outputs
@Stability(value=Stable) @Nullable default IFileSetProducer getInput()
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
@Stability(value=Stable) @Nullable default 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) @Nullable default String getPrimaryOutputDirectory()
After running the script, the contents of the given directory will be treated as the primary output of this Step.
Default: - No primary output
@Stability(value=Stable) static ShellStepProps.Builder builder()
ShellStepProps.Builder of ShellStepPropsCopyright © 2022. All rights reserved.