Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -177,23 +177,30 @@ or by a `Promotion` which failed to complete successfully.
### Common Usage

```yaml
steps:
# Clone, render manifests, commit, push, etc...
- uses: git-commit
as: commit
config:
path: ./out
message: ${{ outputs['update-image'].commitMessage }}
- uses: git-push
config:
path: ./out
- uses: argocd-update
config:
apps:
- name: my-app
sources:
- repoURL: https://github.com/example/repo.git
desiredRevision: ${{ outputs.commit.commit }}
apiVersion: kargo.akuity.io/v1alpha1
kind: Stage
# ...
spec:
# ...
promotionTemplate:
spec:
steps:
# Clone, render manifests, commit, push, etc...
- uses: git-commit
as: commit
config:
path: ./out
message: ${{ outputs['update-image'].commitMessage }}
- uses: git-push
config:
path: ./out
- uses: argocd-update
config:
apps:
- name: my-app
sources:
- repoURL: https://github.com/example/repo.git
desiredRevision: ${{ outputs.commit.commit }}
```

### Updating a Target Revision
Expand Down Expand Up @@ -295,17 +302,25 @@ simple key-value label matching. All specified labels must match for an
application to be selected.

```yaml
steps:
- uses: argocd-update
config:
apps:
- selector:
matchLabels:
environment: production
team: platform
sources:
- repoURL: https://github.com/example/repo.git
desiredRevision: ${{ outputs.commit.commit }}
apiVersion: kargo.akuity.io/v1alpha1
kind: Stage
# ...
spec:
# ...
promotionTemplate:
spec:
steps:
# Clone, render manifests, commit, push, etc...
- uses: argocd-update
config:
apps:
- selector:
matchLabels:
environment: production
team: platform
sources:
- repoURL: https://github.com/example/repo.git
desiredRevision: ${{ outputs.commit.commit }}
```

This configuration will select all Argo CD `Application` resources in the
Expand All @@ -318,20 +333,28 @@ This example demonstrates using `matchExpressions` with the `In` operator to
select `Application`s that match one of several possible values for a label.

```yaml
steps:
- uses: argocd-update
config:
apps:
- selector:
matchExpressions:
- key: environment
operator: In
values:
- staging
- production
sources:
- repoURL: https://github.com/example/repo.git
desiredRevision: ${{ outputs.commit.commit }}
apiVersion: kargo.akuity.io/v1alpha1
kind: Stage
# ...
spec:
# ...
promotionTemplate:
spec:
steps:
# Clone, render manifests, commit, push, etc...
- uses: argocd-update
config:
apps:
- selector:
matchExpressions:
- key: environment
operator: In
values:
- staging
- production
sources:
- repoURL: https://github.com/example/repo.git
desiredRevision: ${{ outputs.commit.commit }}
```

This configuration will select all Argo CD `Application` resources that have
Expand All @@ -344,26 +367,34 @@ more precise selection criteria. All criteria must be satisfied for an
application to be selected.

```yaml
steps:
- uses: argocd-update
config:
apps:
- selector:
matchLabels:
team: platform
matchExpressions:
- key: environment
operator: In
values:
- staging
- production
- key: managed-by
operator: NotIn
values:
- legacy-system
sources:
- repoURL: https://github.com/example/repo.git
desiredRevision: ${{ outputs.commit.commit }}
apiVersion: kargo.akuity.io/v1alpha1
kind: Stage
# ...
spec:
# ...
promotionTemplate:
spec:
steps:
# Clone, render manifests, commit, push, etc...
- uses: argocd-update
config:
apps:
- selector:
matchLabels:
team: platform
matchExpressions:
- key: environment
operator: In
values:
- staging
- production
- key: managed-by
operator: NotIn
values:
- legacy-system
sources:
- repoURL: https://github.com/example/repo.git
desiredRevision: ${{ outputs.commit.commit }}
```

This configuration will select all Argo CD `Application` resources that:
Expand Down Expand Up @@ -402,29 +433,36 @@ environments in a single step. This is useful for rolling out changes to
multiple stages simultaneously, such as in a blue/green deployment scenario.

```yaml
vars:
- name: gitRepo
value: https://github.com/example/repo.git
steps:
# Clone, render manifests, commit, push, etc...
- uses: git-commit
as: commit
config:
path: ./out
message: Update to new version
- uses: git-push
config:
path: ./out
- uses: argocd-update
config:
apps:
- selector:
matchLabels:
app: my-microservice
deployment-group: blue
sources:
- repoURL: ${{ vars.gitRepo }}
desiredRevision: ${{ outputs.commit.commit }}
apiVersion: kargo.akuity.io/v1alpha1
kind: Stage
# ...
spec:
# ...
promotionTemplate:
spec:
vars:
- name: gitRepo
value: https://github.com/example/repo.git
steps:
# Clone, render manifests, commit, push, etc...
- uses: git-commit
as: commit
config:
path: ./out
message: Update to new version
- uses: git-push
config:
path: ./out
- uses: argocd-update
config:
apps:
- selector:
matchLabels:
app: my-microservice
deployment-group: blue
sources:
- repoURL: ${{ vars.gitRepo }}
desiredRevision: ${{ outputs.commit.commit }}
```

This configuration will update all Argo CD `Application` resources that have
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,27 +90,34 @@ to confirm that the `Application` has reached a healthy and synced state before
the `Promotion` is marked as succeeded.

```yaml
steps:
# Clone, render manifests, commit, push, etc...
- uses: git-commit
as: commit
config:
path: ./out
message: ${{ outputs['update-image'].commitMessage }}
- uses: git-push
config:
path: ./out
- uses: argocd-update
config:
apps:
- name: my-app
sources:
- repoURL: https://github.com/example/repo.git
desiredRevision: ${{ outputs.commit.commit }}
- uses: argocd-wait
config:
apps:
- name: my-app
apiVersion: kargo.akuity.io/v1alpha1
kind: Stage
# ...
spec:
# ...
promotionTemplate:
spec:
steps:
# Clone, render manifests, commit, push, etc...
- uses: git-commit
as: commit
config:
path: ./out
message: ${{ outputs['update-image'].commitMessage }}
- uses: git-push
config:
path: ./out
- uses: argocd-update
config:
apps:
- name: my-app
sources:
- repoURL: https://github.com/example/repo.git
desiredRevision: ${{ outputs.commit.commit }}
- uses: argocd-wait
config:
apps:
- name: my-app
```

### Waiting Only for Operation Completion
Expand Down
Loading
Loading