feat(argocd): register actions for application management#8539
feat(argocd): register actions for application management#8539CryptoRodeo merged 1 commit intobackstage:mainfrom
Conversation
Changed Packages
|
|
@drodil please resolve the conficts |
|
@CryptoRodeo done |
There was a problem hiding this comment.
Pull request overview
This PR adds Actions API registrations to the ArgoCD backend plugin to support application-management workflows via Backstage actions.
Changes:
- Registers four new ArgoCD Actions API actions (
argocd:find-applications,argocd:get-application,argocd:list-applications,argocd:get-revision-details). - Wires
ArgoCDServiceinto action registration and adds unit tests for each new action. - Cleans up
argocd-backenddependencies (removesundici) and updates lockfile/knip report.
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| workspaces/argocd/yarn.lock | Removes undici from argocd-backend dependency graph. |
| workspaces/argocd/plugins/argocd-backend/src/plugin.ts | Instantiates ArgoCDService and registers all ArgoCD actions at plugin init. |
| workspaces/argocd/plugins/argocd-backend/src/index.ts | Changes public exports (removes createArgoCDResourceAction from entrypoint). |
| workspaces/argocd/plugins/argocd-backend/src/actions/index.ts | Expands action registrations and changes createArgoCDActions signature. |
| workspaces/argocd/plugins/argocd-backend/src/actions/createListApplicationsAction.ts | New argocd:list-applications action. |
| workspaces/argocd/plugins/argocd-backend/src/actions/createListApplicationsAction.test.ts | Unit tests for list-applications action. |
| workspaces/argocd/plugins/argocd-backend/src/actions/createGetRevisionDetailsAction.ts | New argocd:get-revision-details action. |
| workspaces/argocd/plugins/argocd-backend/src/actions/createGetRevisionDetailsAction.test.ts | Unit tests for get-revision-details action. |
| workspaces/argocd/plugins/argocd-backend/src/actions/createGetApplicationAction.ts | New argocd:get-application action. |
| workspaces/argocd/plugins/argocd-backend/src/actions/createGetApplicationAction.test.ts | Unit tests for get-application action. |
| workspaces/argocd/plugins/argocd-backend/src/actions/createFindApplicationsAction.ts | New argocd:find-applications action. |
| workspaces/argocd/plugins/argocd-backend/src/actions/createFindApplicationsAction.test.ts | Unit tests for find-applications action. |
| workspaces/argocd/plugins/argocd-backend/package.json | Removes undici dependency from argocd-backend package. |
| workspaces/argocd/plugins/argocd-backend/knip-report.md | Updates knip output (now empty report). |
| workspaces/argocd/.changeset/sweet-moles-remain.md | Adds changeset describing newly registered actions (currently marked as patch). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Testing new actions with scaffolder templateschange in Get ArgoCD ApplicationTemplate: ( apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
name: argocd-get-application
title: Get ArgoCD Application
description: Get full details of a specific ArgoCD application from a named instance
tags:
- argocd
- deployment
- kubernetes
spec:
owner: group:default/infrastructure
type: deployment
parameters:
- title: ArgoCD Application Details
required:
- instanceName
- appName
properties:
instanceName:
title: ArgoCD Instance
type: string
description: Name of the ArgoCD instance as configured in argocd.appLocatorMethods[].instances
appName:
title: Application Name
type: string
description: The ArgoCD application name
appNamespace:
title: Application Namespace
type: string
description: Namespace of the application
project:
title: Project Name
type: string
description: ArgoCD project name
steps:
- id: get-application
name: Get ArgoCD Application
action: backstage-community-argocd:argocd:get-application
input:
instanceName: ${{ parameters.instanceName }}
appName: ${{ parameters.appName }}
appNamespace: ${{ parameters.appNamespace }}
project: ${{ parameters.project }}
output:
text:
- title: Application Status
content: |
**Name:** ${{ steps['get-application'].output.name }}
**Sync:** ${{ steps['get-application'].output.syncStatus }}
**Health:** ${{ steps['get-application'].output.healthStatus }}
**Resources:** ${{ steps['get-application'].output.resourcesCount }}Demo: get-argocd-application-demo.mp4Get ArgoCD Revision DetailsTemplate: ( apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
name: argocd-get-revision-details
title: Get ArgoCD Revision Details
description: Fetch the Git commit metadata for a specific revision of an ArgoCD application deployment
tags:
- argocd
- deployment
- kubernetes
spec:
owner: group:default/infrastructure
type: deployment
parameters:
- title: Revision Details
required:
- instanceName
- appName
- revisionID
properties:
instanceName:
title: ArgoCD Instance
type: string
description: Name of the ArgoCD instance
appName:
title: Application Name
type: string
description: The ArgoCD application name
revisionID:
title: Revision ID
type: string
description: Git commit SHA or tag to get details for
appNamespace:
title: Application Namespace
type: string
description: Namespace of the application
steps:
- id: get-revision-details
name: Get Revision Details
action: backstage-community-argocd:argocd:get-revision-details
input:
instanceName: ${{ parameters.instanceName }}
appName: ${{ parameters.appName }}
revisionID: ${{ parameters.revisionID }}
appNamespace: ${{ parameters.appNamespace }}
output:
text:
- title: Revision Info
content: |
**Author:** ${{ steps['get-revision-details'].output.author }}
**Date:** ${{ steps['get-revision-details'].output.date }}
**Message:** ${{ steps['get-revision-details'].output.message }}get-argocd-revision-details.mp4List ArgoCD ApplicationsTemplate: ( apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
name: argocd-list-applications
title: List ArgoCD Applications
description: List ArgoCD applications on a specific instance with optional filtering
tags:
- argocd
- deployment
- kubernetes
spec:
owner: group:default/infrastructure
type: deployment
parameters:
- title: List ArgoCD Applications
required:
- instanceName
properties:
instanceName:
title: ArgoCD Instance
type: string
description: Name of the ArgoCD instance as configured in argocd.appLocatorMethods[].instances
selector:
title: Label Selector
type: string
description: "Label selector to filter applications, e.g. app.kubernetes.io/part-of=my-app"
project:
title: Project Name
type: string
description: Filter by ArgoCD project name
appNamespace:
title: Application Namespace
type: string
description: Filter by application namespace
steps:
- id: list-applications
name: List ArgoCD Applications
action: backstage-community-argocd:argocd:list-applications
input:
instanceName: ${{ parameters.instanceName }}
selector: ${{ parameters.selector }}
project: ${{ parameters.project }}
appNamespace: ${{ parameters.appNamespace }}
output:
text:
- title: Applications Found
content: |
Total: ${{ steps['list-applications'].output.totalCount }}
```json
${{ steps['list-applications'].output.applications | dump }}
```Demo: list-argocd-apps-demo.mp4Find ArgoCD ApplicationsI was unable to get apps with this one... Template: ( apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
name: argocd-find-applications
title: Find ArgoCD Applications
description: Find all ArgoCD applications across all configured instances by application name
tags:
- argocd
- deployment
- kubernetes
spec:
owner: group:default/infrastructure
type: deployment
parameters:
- title: Find ArgoCD Applications
required:
- appName
properties:
appName:
title: Application Name
type: string
description: The ArgoCD application name to search for
project:
title: Project Name
type: string
description: Filter by ArgoCD project name
appNamespace:
title: Application Namespace
type: string
description: Filter by application namespace
steps:
- id: find-applications
name: Find ArgoCD Applications
action: backstage-community-argocd:argocd:find-applications
input:
appName: ${{ parameters.appName }}
project: ${{ parameters.project }}
appNamespace: ${{ parameters.appNamespace }}
output:
text:
- title: Found Instances
content: |
```json
${{ steps['find-applications'].output.instances | dump }}
```Demo: find-argocd-applications-demo.mp4I think this is a bug. After adding const results = await argoCDService.findApplications({
appName: input.appName,
project: input.project,
appNamespace: input.appNamespace,
expand: 'applications', // <- HERE
});Demo with Fix: Screencast.From.2026-04-17.16-26-16.mp4Besides the bug, maybe adding some scaffolder and action templates would make local testing easier for other devs? I can add the example templates in another PR if you prefer to not add them in this one 🙂 |
… management Signed-off-by: Hellgren Heikki <heikki.hellgren@op.fi>
|
I added the |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 16 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
CryptoRodeo
left a comment
There was a problem hiding this comment.
@drodil Yeah that's fine, I can tackle that in another PR, thanks!
… management (backstage#8539) Signed-off-by: Hellgren Heikki <heikki.hellgren@op.fi> Signed-off-by: Emiel van Lankveld <evanlankveld@bol.com>
Hey, I just made a Pull Request!
4 new actions for argocd backend
✔️ Checklist
Signed-off-byline in the message. (more info)