@@ -177,23 +177,30 @@ or by a `Promotion` which failed to complete successfully.
177177# ## Common Usage
178178
179179` ` ` yaml
180- steps:
181- # Clone, render manifests, commit, push, etc...
182- - uses: git-commit
183- as: commit
184- config:
185- path: ./out
186- message: ${{ outputs['update-image'].commitMessage }}
187- - uses: git-push
188- config:
189- path: ./out
190- - uses: argocd-update
191- config:
192- apps:
193- - name: my-app
194- sources:
195- - repoURL: https://github.com/example/repo.git
196- desiredRevision: ${{ outputs.commit.commit }}
180+ apiVersion: kargo.akuity.io/v1alpha1
181+ kind: Stage
182+ # ...
183+ spec:
184+ # ...
185+ promotionTemplate:
186+ spec:
187+ steps:
188+ # Clone, render manifests, commit, push, etc...
189+ - uses: git-commit
190+ as: commit
191+ config:
192+ path: ./out
193+ message: ${{ outputs['update-image'].commitMessage }}
194+ - uses: git-push
195+ config:
196+ path: ./out
197+ - uses: argocd-update
198+ config:
199+ apps:
200+ - name: my-app
201+ sources:
202+ - repoURL: https://github.com/example/repo.git
203+ desiredRevision: ${{ outputs.commit.commit }}
197204` ` `
198205
199206# ## Updating a Target Revision
@@ -295,17 +302,25 @@ simple key-value label matching. All specified labels must match for an
295302application to be selected.
296303
297304` ` ` yaml
298- steps:
299- - uses: argocd-update
300- config:
301- apps:
302- - selector:
303- matchLabels:
304- environment: production
305- team: platform
306- sources:
307- - repoURL: https://github.com/example/repo.git
308- desiredRevision: ${{ outputs.commit.commit }}
305+ apiVersion: kargo.akuity.io/v1alpha1
306+ kind: Stage
307+ # ...
308+ spec:
309+ # ...
310+ promotionTemplate:
311+ spec:
312+ steps:
313+ # Clone, render manifests, commit, push, etc...
314+ - uses: argocd-update
315+ config:
316+ apps:
317+ - selector:
318+ matchLabels:
319+ environment: production
320+ team: platform
321+ sources:
322+ - repoURL: https://github.com/example/repo.git
323+ desiredRevision: ${{ outputs.commit.commit }}
309324` ` `
310325
311326This configuration will select all Argo CD `Application` resources in the
@@ -318,20 +333,28 @@ This example demonstrates using `matchExpressions` with the `In` operator to
318333select `Application`s that match one of several possible values for a label.
319334
320335` ` ` yaml
321- steps:
322- - uses: argocd-update
323- config:
324- apps:
325- - selector:
326- matchExpressions:
327- - key: environment
328- operator: In
329- values:
330- - staging
331- - production
332- sources:
333- - repoURL: https://github.com/example/repo.git
334- desiredRevision: ${{ outputs.commit.commit }}
336+ apiVersion: kargo.akuity.io/v1alpha1
337+ kind: Stage
338+ # ...
339+ spec:
340+ # ...
341+ promotionTemplate:
342+ spec:
343+ steps:
344+ # Clone, render manifests, commit, push, etc...
345+ - uses: argocd-update
346+ config:
347+ apps:
348+ - selector:
349+ matchExpressions:
350+ - key: environment
351+ operator: In
352+ values:
353+ - staging
354+ - production
355+ sources:
356+ - repoURL: https://github.com/example/repo.git
357+ desiredRevision: ${{ outputs.commit.commit }}
335358` ` `
336359
337360This configuration will select all Argo CD `Application` resources that have
@@ -344,26 +367,34 @@ more precise selection criteria. All criteria must be satisfied for an
344367application to be selected.
345368
346369` ` ` yaml
347- steps:
348- - uses: argocd-update
349- config:
350- apps:
351- - selector:
352- matchLabels:
353- team: platform
354- matchExpressions:
355- - key: environment
356- operator: In
357- values:
358- - staging
359- - production
360- - key: managed-by
361- operator: NotIn
362- values:
363- - legacy-system
364- sources:
365- - repoURL: https://github.com/example/repo.git
366- desiredRevision: ${{ outputs.commit.commit }}
370+ apiVersion: kargo.akuity.io/v1alpha1
371+ kind: Stage
372+ # ...
373+ spec:
374+ # ...
375+ promotionTemplate:
376+ spec:
377+ steps:
378+ # Clone, render manifests, commit, push, etc...
379+ - uses: argocd-update
380+ config:
381+ apps:
382+ - selector:
383+ matchLabels:
384+ team: platform
385+ matchExpressions:
386+ - key: environment
387+ operator: In
388+ values:
389+ - staging
390+ - production
391+ - key: managed-by
392+ operator: NotIn
393+ values:
394+ - legacy-system
395+ sources:
396+ - repoURL: https://github.com/example/repo.git
397+ desiredRevision: ${{ outputs.commit.commit }}
367398` ` `
368399
369400This configuration will select all Argo CD `Application` resources that :
@@ -402,29 +433,36 @@ environments in a single step. This is useful for rolling out changes to
402433multiple stages simultaneously, such as in a blue/green deployment scenario.
403434
404435` ` ` yaml
405- vars:
406- - name: gitRepo
407- value: https://github.com/example/repo.git
408- steps:
409- # Clone, render manifests, commit, push, etc...
410- - uses: git-commit
411- as: commit
412- config:
413- path: ./out
414- message: Update to new version
415- - uses: git-push
416- config:
417- path: ./out
418- - uses: argocd-update
419- config:
420- apps:
421- - selector:
422- matchLabels:
423- app: my-microservice
424- deployment-group: blue
425- sources:
426- - repoURL: ${{ vars.gitRepo }}
427- desiredRevision: ${{ outputs.commit.commit }}
436+ apiVersion: kargo.akuity.io/v1alpha1
437+ kind: Stage
438+ # ...
439+ spec:
440+ # ...
441+ promotionTemplate:
442+ spec:
443+ vars:
444+ - name: gitRepo
445+ value: https://github.com/example/repo.git
446+ steps:
447+ # Clone, render manifests, commit, push, etc...
448+ - uses: git-commit
449+ as: commit
450+ config:
451+ path: ./out
452+ message: Update to new version
453+ - uses: git-push
454+ config:
455+ path: ./out
456+ - uses: argocd-update
457+ config:
458+ apps:
459+ - selector:
460+ matchLabels:
461+ app: my-microservice
462+ deployment-group: blue
463+ sources:
464+ - repoURL: ${{ vars.gitRepo }}
465+ desiredRevision: ${{ outputs.commit.commit }}
428466` ` `
429467
430468This configuration will update all Argo CD `Application` resources that have
0 commit comments