Skip to content

Commit 876bac3

Browse files
authored
feat: Add konflux-kargo-bot ability to automerge kargo app in stage (#533)
Signed-off-by: flacatus <flacatus@redhat.com>
1 parent b00e0d4 commit 876bac3

3 files changed

Lines changed: 48 additions & 3 deletions

File tree

components/kargo/OWNERS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,9 @@ approvers:
55
- psturc
66
- p8r-the-gr8
77
- flacatus
8+
9+
reviewers:
10+
11+
- psturc
12+
- p8r-the-gr8
13+
- flacatus

components/kargo/internal-production/projects/kargo-infra-common/base/stage-ring-1-staging.yaml

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,23 +76,43 @@ spec:
7676
sourceBranch: ${{ ctx.project }}/${{ vars.component }}/ring-1-staging
7777
targetBranch: main
7878
title: "chore(${{ ctx.stage }}): promote ${{ vars.component }} to staging"
79+
description: |
80+
## Automated Promotion — Staging (Ring 1)
81+
82+
**Component:** `${{ vars.component }}`
83+
**Project:** `${{ ctx.project }}`
84+
**Stage:** `${{ ctx.stage }}`
85+
86+
This PR was automatically created by [Kargo](https://kargo.io) as part of the
87+
`kargo-infra-common` promotion pipeline.
88+
89+
### What changed
90+
- Updated `${{ vars.component }}` configuration in the **internal-staging** environment
91+
to align with the latest freight from the upstream warehouse.
92+
93+
### Merge policy
94+
This PR will be automatically merged once all required CI checks pass.
95+
96+
> **Note:** Do not manually edit this branch — it is force-pushed on each promotion cycle.
7997
labels:
8098
- ring-1
8199
- staging
82100
- automated-promotion
83101
- component/${{ vars.component }}
84-
- uses: git-wait-for-pr
102+
- uses: git-merge-pr
85103
if: ${{ status('open-pr') != 'Errored' }}
86-
as: wait-for-pr
104+
as: merge-pr
87105
config:
88106
repoURL: ${{ vars.repoURL }}
89107
prNumber: ${{ outputs['open-pr'].pr.id }}
108+
wait: true
90109
- uses: argocd-update
110+
if: ${{ status('open-pr') != 'Errored' }}
91111
as: argocd-update
92112
config:
93113
apps:
94114
- name: ${{ vars.component }}-in-cluster
95115
namespace: argocd-local
96116
sources:
97117
- repoURL: ${{ vars.repoURL }}
98-
desiredRevision: ${{ outputs['wait-for-pr'].commit }}
118+
desiredRevision: ${{ outputs['merge-pr'].commit }}

components/kargo/internal-production/projects/kargo-infra-common/base/stage-ring-2-production.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,24 @@ spec:
6666
sourceBranch: ${{ ctx.project }}/${{ vars.component }}/ring-2-production
6767
targetBranch: main
6868
title: "chore(${{ ctx.stage }}): promote ${{ vars.component }} to production"
69+
description: |
70+
## Automated Promotion — Production (Ring 2)
71+
72+
**Component:** `${{ vars.component }}`
73+
**Project:** `${{ ctx.project }}`
74+
**Stage:** `${{ ctx.stage }}`
75+
76+
This PR was automatically created by [Kargo](https://kargo.io) as part of the
77+
`kargo-infra-common` promotion pipeline.
78+
79+
### What changed
80+
- Updated `${{ vars.component }}` configuration in the **internal-production** environment
81+
to align with freight verified in the staging ring.
82+
83+
### Merge policy
84+
This PR requires manual approval before merging to production.
85+
86+
> **Note:** Do not manually edit this branch — it is force-pushed on each promotion cycle.
6987
labels:
7088
- ring-2
7189
- production
@@ -78,6 +96,7 @@ spec:
7896
repoURL: ${{ vars.repoURL }}
7997
prNumber: ${{ outputs['open-pr'].pr.id }}
8098
- uses: argocd-update
99+
if: ${{ status('open-pr') != 'Errored' }}
81100
as: argocd-update
82101
config:
83102
apps:

0 commit comments

Comments
 (0)