# ShellStepProps

Construction properties for a `ShellStep`.

Extends: ShellStepProps
Used as props by: ShellStep

- Source: [`pipelines/lib/blueprint/shell-step.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/pipelines/lib/blueprint/shell-step.ts#L13)

## Example

```ts
declare const pipeline: pipelines.CodePipeline;
const preprod = new MyApplicationStage(this, 'PreProd');
const prod = new MyApplicationStage(this, 'Prod');
const topic = new sns.Topic(this, 'ChangeApprovalTopic');

pipeline.addStage(preprod, {
  post: [
    new pipelines.ShellStep('Validate Endpoint', {
      commands: ['curl -Ssf https://my.webservice.com/'],
    }),
  ],
});
pipeline.addStage(prod, {
  pre: [new pipelines.ManualApprovalStep('PromoteToProd', {
    //All options below are optional
    comment: 'Please validate changes',
    reviewUrl: 'https://my.webservice.com/',
    notificationTopic: topic,
  })],
});
```

## Properties

- `additionalInputs`: { [key: string]: [IFileSetProducer](/cdk/api/v2/docs/aws-cdk-lib.pipelines.IFileSetProducer.html) } — Additional FileSets to put in other directories.

  **Default:** No additional inputs

  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:

  ```ts
  const script = new pipelines.ShellStep('MainScript', {
    commands: ['npm ci','npm run build','npx cdk synth'],
    input: pipelines.CodePipelineSource.gitHub('org/source1', 'main'),
    additionalInputs: {
      '../siblingdir': pipelines.CodePipelineSource.gitHub('org/source2', 'main'),
    }
  });
  ```

- `commands`: string[] (required) — Commands to run.

- `env`: { [key: string]: string } — Environment variables to set.

  **Default:** No environment variables

- `envFromCfnOutputs`: { [key: string]: [CfnOutput](/cdk/api/v2/docs/aws-cdk-lib.CfnOutput.html) } — Set environment variables based on Stack Outputs.

  **Default:** No environment variables created from stack outputs

  `ShellStep`s following stack or stage deployments may
  access the `CfnOutput`s of those stacks to get access to
  --for example--automatically generated resource names or
  endpoint URLs.

- `input`: [IFileSetProducer](/cdk/api/v2/docs/aws-cdk-lib.pipelines.IFileSetProducer.html) — FileSet to run these scripts on.

  **Default:** No input specified

  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.

- `installCommands`: string[] — Installation commands to run before the regular commands.

  **Default:** No installation commands

  For deployment engines that support it, install commands will be classified
  differently in the job history from the regular `commands`.

- `primaryOutputDirectory`: string — The directory that will contain the primary output fileset.

  **Default:** No primary output

  After running the script, the contents of the given directory
  will be treated as the primary output of this Step.
