.kodeshift/ directory at the root of your Git repository. This guide covers every configuration option available.
Directory Structure
When you initialize a pipeline through the UI, this entire structure is generated automatically on a dedicated
kodeshift branch in your repository.Main Configuration (.kodeshift.yaml)
The entry point defines which stages exist and which files to include.
Fields
Job Definitions (.kodeshift-pipeline.yaml)
Each top-level key is a job name. The key must match one of the stages declared in .kodeshift.yaml.
Field Reference
Both
snake_case and camelCase field names are accepted (e.g. stage_group or stageGroup).Image Configuration
For standard jobs, only
name is needed. The command, args, and env fields are used for specialized containers like Kaniko that require a custom entrypoint.
Script References
Scripts ininit and script fields support several formats.
Reference syntax (@)
Reference a reusable block defined in .kodeshift-common.yaml:
use_ prefix also works (use_clone_scripts) but @ is preferred.
Inline commands
Advanced formats
Scripts can also be objects:Common Scripts (.kodeshift-common.yaml)
Define reusable script blocks that jobs reference with @:
Environment Pattern Matching
Theenvironments field on each job uses pattern matching to determine which environments a job runs in.
Conditional allow_fail
allow_fail can be a list of environment names instead of a boolean:
Trigger Configuration (.kodeshift-trigger.yaml)
Defines which Git events trigger the pipeline and how branches/tags map to environments.
Trigger Types
Branch Patterns
feature/*— matches one path segment (e.g.feature/login)feature/**— matches nested segments (e.g.feature/user/auth)v*— matches tags likev1.0.0,v2.1.3-beta
Environment Mapping
Maps the branch or tag pattern to an environment name. When a webhook fires, the pipeline runner looks up the matching pattern to determine which environment to deploy to.Workflow Models
- Trunk-Based
- GitFlow
Development happens on short-lived branches merged to
main. Production deploys are triggered by tagging.Parallel Execution (Stage Groups)
Jobs that share the samestage_group and stage_group_order run in parallel:
analysis stage.
Helm Chart Integration
The.kodeshift/chart/ directory holds a standard Helm chart used by ArgoCD for deployment.
values-${ENV}.yaml on top of the base values.yaml, so you only need to specify overrides per environment.
Pipeline Lifecycle
Built-in Variables
These variables are available in all scripts via${VARIABLE} syntax.
Validation Rules
When a pipeline is saved or triggered, the system validates:- Main YAML schema —
stagesandincludesmust conform to the expected structure - Included files exist — every path in
includesmust resolve to a valid file - Stage references — each job’s
stagefield must match a declared stage name - Environment consistency (legacy dict format only) — environments declared in job files must match those in the
stagesdict - Common scripts — YAML syntax is validated but references are resolved at runtime