Commands

Porch provides six built-in command types for different execution patterns. Each command type serves a specific purpose and has its own configuration options.

Overview

Command TypePurposeExecution Mode
ShellExecute shell commandsSingle
PowerShellExecute PowerShell scriptsSingle
SerialRun commands sequentiallyContainer
ParallelRun commands concurrentlyContainer
ForEach DirectoryExecute commands in multiple directoriesContainer
Copy to TempCopy working directory to temporary locationUtility

Single Commands

Single commands execute a single task:

  • Shell: Execute any shell command or script
  • PowerShell: Execute PowerShell scripts (Windows, Linux, macOS)

Container Commands

Container commands group and control the execution of other commands:

Utility Commands

Utility commands provide special functionality:

Common Attributes

All commands share these common attributes:

  • type (required): The command type
  • name (required): Descriptive name for the command
  • working_directory (optional): Working directory for execution
  • env (optional): Environment variables as key-value pairs
  • runs_on_condition (optional): When to run (success, error, always, exit-codes)
  • runs_on_exit_codes (optional): Specific exit codes that trigger execution

See individual command pages for type-specific attributes and detailed examples.