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 --- 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 }} author: name: Kargo email: kargo@max.test.scrumdapp.open-ict.hu checkout: - commit: ${{ commitFrom(vars.repoURL).ID }} path: ./src - branch: prod create: true path: ./out - uses: git-clear config: path: ./out - uses: copy config: inPath: ./src/Chart.yaml outPath: ./out/Chart.yaml - uses: copy config: inPath: ./src/values.yaml outPath: ./out/values.yaml - uses: copy config: inPath: ./src/values-dev.yaml outPath: ./out/values-dev.yaml - uses: copy config: inPath: ./src/values-staging.yaml outPath: ./out/values-staging.yaml - uses: copy config: inPath: ./src/values-prod.yaml outPath: ./out/values-prod.yaml - uses: copy config: inPath: ./src/templates outPath: ./out/templates - uses: copy config: inPath: ./src/bootstrap outPath: ./out/bootstrap - uses: copy config: inPath: ./src/README.md outPath: ./out/README.md - uses: copy config: inPath: ./src/.gitignore outPath: ./out/.gitignore - uses: git-commit as: commit config: path: ./out message: Promote ${{ commitFrom(vars.repoURL).ID }} to prod - uses: git-push config: path: ./out targetBranch: prod - uses: argocd-update config: apps: - name: web-prod sources: - repoURL: ${{ vars.repoURL }} desiredRevision: ${{ outputs.commit.commit }}