assay.argocd
ArgoCD GitOps application management. Apps, sync, health, projects, repositories, clusters. Client:
argocd.client(url, {token="..."}) or {username="...", password="..."}.
c.apps:list(opts?)→ [app] — List applications.opts:{project, selector}c.apps:get(name)→ app — Get application by namec.apps:health(name)→{status, sync, message}— Get app health and sync statusc.apps:sync(name, opts?)→ result — Trigger sync.opts:{revision, prune, dry_run, strategy}c.apps:refresh(name, opts?)→ app — Refresh app state.opts.type:"normal"(default) or"hard"c.apps:rollback(name, id)→ result — Rollback to history IDc.apps:resources(name)→ resource_tree — Get application resource treec.apps:manifests(name, opts?)→ manifests — Get manifests.opts:{revision}c.apps:delete(name, opts?)→ nil — Delete app.opts:{cascade, propagation_policy}c.apps:is_healthy(name)→ bool — Check if app health status is "Healthy"c.apps:is_synced(name)→ bool — Check if app sync status is "Synced"c.apps:wait_healthy(name, timeout_secs)→ true — Wait for app to become healthy, errors on timeoutc.apps:wait_synced(name, timeout_secs)→ true — Wait for app to become synced, errors on timeoutc.projects:list()→ [project] — List projectsc.projects:get(name)→ project — Get project by namec.repositories:list()→ [repo] — List repositoriesc.repositories:get(repo_url)→ repo — Get repository by URLc.clusters:list()→ [cluster] — List clustersc.clusters:get(server_url)→ cluster — Get cluster by server URLc.settings:get()→ settings — Get ArgoCD settingsc:version()→ version — Get ArgoCD version info
Example:
local argocd = require("assay.argocd")
local c = argocd.client("https://argocd.example.com", {token = env.get("ARGOCD_TOKEN")})
c.apps:sync("my-app", {prune = true})
c.apps:wait_healthy("my-app", 120)