Files
kub-web-test/bootstrap/02-kargo-pipeline.yaml
T
2026-09-10 13:36:17 +00:00

135 lines
2.9 KiB
YAML

apiVersion: kargo.akuity.io/v1alpha1
kind: ProjectConfig
metadata:
name: web
namespace: web
spec:
promotionPolicies:
- stageSelector:
name: dev
autoPromotionEnabled: true
- stageSelector:
name: staging
autoPromotionEnabled: false
- stageSelector:
name: prod
autoPromotionEnabled: false
---
apiVersion: kargo.akuity.io/v1alpha1
kind: Warehouse
metadata:
name: web
namespace: web
spec:
subscriptions:
- git:
repoURL: https://git.5vl.nl/5vl/kub-web-test.git
branch: dev
includePaths:
- Chart.yaml
- values.yaml
- values-dev.yaml
- values-staging.yaml
- values-prod.yaml
- templates
- website
---
apiVersion: kargo.akuity.io/v1alpha1
kind: Stage
metadata:
name: dev
namespace: web
spec:
requestedFreight:
- origin:
kind: Warehouse
name: web
sources:
direct: true
promotionTemplate:
spec:
vars:
- name: repoURL
value: https://git.5vl.nl/5vl/kub-web-test.git
steps:
- uses: argocd-update
config:
apps:
- name: web-dev
sources:
- repoURL: ${{ vars.repoURL }}
desiredRevision: ${{ commitFrom(vars.repoURL).ID }}
---
apiVersion: kargo.akuity.io/v1alpha1
kind: Stage
metadata:
name: staging
namespace: web
spec:
requestedFreight:
- origin:
kind: Warehouse
name: web
sources:
stages:
- dev
promotionTemplate:
spec:
vars:
- name: repoURL
value: https://git.5vl.nl/5vl/kub-web-test.git
steps:
- uses: argocd-update
config:
apps:
- name: web-staging
sources:
- repoURL: ${{ vars.repoURL }}
desiredRevision: ${{ commitFrom(vars.repoURL).ID }}
updateTargetRevision: true
---
apiVersion: kargo.akuity.io/v1alpha1
kind: Stage
metadata:
name: prod
namespace: web
spec:
requestedFreight:
- origin:
kind: Warehouse
name: web
sources:
stages:
- staging
promotionTemplate:
spec:
vars:
- name: repoURL
value: https://git.5vl.nl/5vl/kub-web-test.git
steps:
- uses: git-clone
config:
repoURL: ${{ vars.repoURL }}
checkout:
- commit: ${{ commitFrom(vars.repoURL).ID }}
path: ./out
- uses: git-push
as: push
config:
path: ./out
targetBranch: prod
force: true
- uses: argocd-update
config:
apps:
- name: web-prod
sources:
- repoURL: ${{ vars.repoURL }}
desiredRevision: ${{ outputs.push.commit }}