Skip to content

feat(deploy/argocd-manifest-files): add support for singular source format in ArgoCD manifest files action#283

Merged
neilime merged 1 commit intomainfrom
copilot/support-single-multiple-sources
Dec 2, 2025
Merged

feat(deploy/argocd-manifest-files): add support for singular source format in ArgoCD manifest files action#283
neilime merged 1 commit intomainfrom
copilot/support-single-multiple-sources

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 1, 2025

The deploy/argocd-manifest-files action only supported the sources array format. ArgoCD manifests can use either singular source or sources[] format, and HOVERKRAFT_DEPLOYMENT_ID should be updated in any source with the "hoverkraft-deployment" plugin.

Changes

  • Format detection: Check if manifest uses .spec.source or .spec.sources and apply updates accordingly
  • Plugin env updates:
    • Singular format: update .spec.source.plugin.env if plugin name matches
    • Array format: update ALL sources[] entries with hoverkraft-deployment plugin (not just sources[0])
  • Tests: Added test templates for singular source format using matrix strategy

Supported formats

# Singular
spec:
  source:
    chart: test-app
    repoURL: ghcr.io/test-org/test-app/charts
    targetRevision: # updated by deploy workflow
    plugin:
      name: hoverkraft-deployment
      env:
        - name: HOVERKRAFT_DEPLOYMENT_ID
          value: ""  # updated
# Array (any source with hoverkraft-deployment plugin is updated)
spec:
  sources:
    - chart: test-app
      repoURL: ghcr.io/test-org/test-app/charts
      targetRevision: HEAD
      plugin:
        name: hoverkraft-deployment
        env:
          - name: HOVERKRAFT_DEPLOYMENT_ID
            value: ""  # updated
Original prompt

On action.yml, It should support when there is only one source or multiple sources

  source:
    chart: test-app
    repoURL: ghcr.io/test-org/test-app/charts
    targetRevision: # Will be updated by deploy workflow 

Or

  sources:
    - repoURL: ghcr.io/test-org/test-app/charts
      targetRevision: HEAD # Will be updated by deploy worklfow
      chart: test-app

HOVERKRAFT_DEPLOYMENT_ID must be updated in any source or sources[x] in case if there is the plugin with name "hoverkraft-deployment"


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Support single or multiple sources in action.yml Add support for singular source format in ArgoCD manifest files action Dec 1, 2025
Copilot AI requested a review from neilime December 1, 2025 20:10
@neilime neilime marked this pull request as ready for review December 1, 2025 20:11
@neilime neilime force-pushed the copilot/support-single-multiple-sources branch from 7b8b31e to fc84008 Compare December 1, 2025 21:32
@neilime neilime changed the title Add support for singular source format in ArgoCD manifest files action feat(deploy/argocd-manifest-files): add support for singular source format in ArgoCD manifest files action Dec 1, 2025
@neilime neilime force-pushed the copilot/support-single-multiple-sources branch from fc84008 to 91252f7 Compare December 1, 2025 21:39
@neilime neilime force-pushed the copilot/support-single-multiple-sources branch 7 times, most recently from f069fb5 to 7d4cb7b Compare December 2, 2025 08:48
…ormat

Co-authored-by: neilime <314088+neilime@users.noreply.github.com>
@neilime neilime force-pushed the copilot/support-single-multiple-sources branch from 7d4cb7b to 8c2d2a3 Compare December 2, 2025 08:55
@neilime neilime merged commit ad2ab51 into main Dec 2, 2025
23 checks passed
@neilime neilime deleted the copilot/support-single-multiple-sources branch December 2, 2025 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants