Skip to content

feat: add conditions to deployment chain configuration #6650

@mugiwaraluffy56

Description

@mugiwaraluffy56

What would you like to be added:

a way to configure conditions on deployment chain triggers so that downstream apps only get deployed based on the outcome of the upstream deployment. right now a chain fires all matchers unconditionally regardless of whether the first deployment succeeded or failed.

there's actually already a commented-out stub for this in the codebase at pkg/configv1/application.go:

// TODO: Add conditions to deployment chain configuration.
// Conditions *DeploymentChainTriggerCondition `json:"conditions,omitempty"`

something like this would make sense:

pipeline:
  stages:
    - name: K8S_SYNC
  chain:
    conditions:
      status: SUCCESS
    applicationMatchers:
      - name: myapp-prod

Why is this needed:

without this, a failed staging deployment still triggers production. the whole point of chaining deployments is to gate on the previous result, and right now that gate doesn't exist. you'd have to manually cancel downstream deployments after a failure which defeats the purpose.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions