Class ShellStep

Run shell script commands in the pipeline.

Implements
Inherited Members
Namespace: Amazon.CDK.Pipelines
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class ShellStep : Step, IFileSetProducer
Syntax (vb)
Public Class ShellStep Inherits Step Implements IFileSetProducer
Examples
CodePipeline pipeline;

             var preprod = new MyApplicationStage(this, "PreProd");
             var prod = new MyApplicationStage(this, "Prod");
             var topic = new Topic(this, "ChangeApprovalTopic");

             pipeline.AddStage(preprod, new AddStageOpts {
                 Post = new [] {
                     new ShellStep("Validate Endpoint", new ShellStepProps {
                         Commands = new [] { "curl -Ssf https://my.webservice.com/" }
                     }) }
             });
             pipeline.AddStage(prod, new AddStageOpts {
                 Pre = new [] { new ManualApprovalStep("PromoteToProd", new ManualApprovalStepProps {
                     //All options below are optional
                     Comment = "Please validate changes",
                     ReviewUrl = "https://my.webservice.com/",
                     NotificationTopic = topic
                 }) }
             });

Synopsis

Constructors

Properties

Commands

Commands to run.

ConsumedStackOutputs

StackOutputReferences this step consumes.

Env

Environment variables to set.

EnvFromCfnOutputs

Set environment variables based on Stack Outputs.

Inputs

Input FileSets.

InstallCommands

Installation commands to run before the regular commands.

Outputs

Output FileSets.

Methods

Constructors

ShellStep(string, IShellStepProps)

Run shell script commands in the pipeline.

public ShellStep(string id, IShellStepProps props)
Parameters
id string

Identifier for this step.

props IShellStepProps

Identifier for this step.

Properties

Commands

Commands to run.

public virtual string[] Commands { get; }
Property Value

string[]

Remarks

ConsumedStackOutputs

StackOutputReferences this step consumes.

public override StackOutputReference[] ConsumedStackOutputs { get; }
Property Value

StackOutputReference[]

Overrides

Env

Environment variables to set.

public virtual IDictionary<string, string> Env { get; }
Property Value

IDictionary<string, string>

EnvFromCfnOutputs

Set environment variables based on Stack Outputs.

public virtual IDictionary<string, StackOutputReference> EnvFromCfnOutputs { get; }
Property Value

IDictionary<string, StackOutputReference>

Inputs

Input FileSets.

public virtual IFileSetLocation[] Inputs { get; }
Property Value

IFileSetLocation[]

InstallCommands

Installation commands to run before the regular commands.

public virtual string[] InstallCommands { get; }
Property Value

string[]

Remarks

Outputs

Output FileSets.

public virtual IFileSetLocation[] Outputs { get; }
Property Value

IFileSetLocation[]

Methods

AddOutputDirectory(string)

Add an additional output FileSet based on a directory.

public virtual FileSet AddOutputDirectory(string directory)
Parameters
directory string
Returns

FileSet

PrimaryOutputDirectory(string)

Configure the given output directory as primary output.

public virtual FileSet PrimaryOutputDirectory(string directory)
Parameters
directory string
Returns

FileSet

Implements