A pipeline command is a named, reusable sequence of steps that performs an automation operation. In CircleCI, commands package steps for reuse, while jobs add an executor; GitHub Actions uses the related action abstraction. section 6.3.7
Use pipeline commands to keep repository-local pipelines simple and maintainable:
- Keep local pipeline code focused on triggers and event ordering; place step implementation in shared, versioned pipeline or language libraries. section 6.3.7
- Reuse commands inside jobs and compose jobs in workflows, using filters and dependencies to control when work runs and what runs first. section 6.3.7
Infrastructure planning command
A reusable command can check out code, configure remote Docker, run terraform init, generate a Terraform plan, convert it to JSON, and conditionally run a Checkov scan. Parameters select the working directory, variable file, output path, and scan options.
