argocd.star¶
Edit Argo CD Application manifests: move an application to a new revision or chart version.
Edits are line-based, so comments and layout stay as they were.
| Function | What it does |
|---|---|
applications |
Lists the YAML files that define Argo CD Applications or ApplicationSets. |
set_target_revision |
Sets targetRevision for every source that points at a repository. |
applications¶
Lists the YAML files that define Argo CD Applications or ApplicationSets.
Arguments
| Name | Description |
|---|---|
repo |
The repo passed to change(repo). |
Returns: The sorted paths of YAML files with apiVersion: argoproj.io/... and
kind: Application or kind: ApplicationSet.
Example
set_target_revision¶
Sets targetRevision for every source that points at a repository.
A newer version already there is kept, so a campaign never lowers one.
Works for source and each entry of sources. A Helm chart from a chart
repository is matched by its repoURL too, and its targetRevision is
the chart version.
Arguments
| Name | Description |
|---|---|
repo |
The repo passed to change(repo). |
repo_url |
The source's repoURL, as written. |
revision |
The new branch, tag, commit or chart version. |
Returns: The list of paths that changed.
Example
set_target_revision(repo, "https://github.com/acme/deploy.git", "v1.5.0")
# returns ["apps/api.yaml"]
apps/api.yaml
Used in: argocd-revision