Interface ShellStepProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Subinterfaces:
CodeBuildStepProps
All Known Implementing Classes:
CodeBuildStepProps.Jsii$Proxy, ShellStepProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-18T17:54:26.231Z") @Stability(Stable) public interface ShellStepProps extends software.amazon.jsii.JsiiSerializable
Construction properties for a 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)
         );
 
  • Method Details

    • getCommands

      @Stability(Stable) @NotNull List<String> getCommands()
      Commands to run.
    • getAdditionalInputs

      @Stability(Stable) @Nullable default Map<String,IFileSetProducer> 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

      @Stability(Stable) @Nullable default Map<String,String> getEnv()
      Environment variables to set.

      Default: - No environment variables

    • getEnvFromCfnOutputs

      @Stability(Stable) @Nullable default Map<String,CfnOutput> getEnvFromCfnOutputs()
      Set environment variables based on Stack Outputs.

      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

    • getInput

      @Stability(Stable) @Nullable default IFileSetProducer 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

      @Stability(Stable) @Nullable default List<String> 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

      @Stability(Stable) @Nullable default String 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

      @Stability(Stable) static ShellStepProps.Builder builder()
      Returns:
      a ShellStepProps.Builder of ShellStepProps