pipe-cd / pipe-cd/pipecd

feat: add conditions to deployment chain configuration

Open
#6,650 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

kind/question
Dominant language
Go
Stars
1.4k
Forks
364
Avg merge
1d 4h
Merged PRs (30d)
84

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the commented condition stub in pkg/configv1/application.go, then trace how deployment chain triggers and applicationMatchers are processed. Define the configuration and execution path for the shown status: SUCCESS condition, and verify that downstream applications run only when the upstream deployment has the matching outcome.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
ci-cd, devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.