Skip to content

feat(deploy/argocd-manifest-files): add ARGOCD_MULTI_SOURCES environment variable to distinguish source types#297

Merged
neilime merged 2 commits intomainfrom
copilot/handle-env-var-argocd-sources
Dec 9, 2025
Merged

feat(deploy/argocd-manifest-files): add ARGOCD_MULTI_SOURCES environment variable to distinguish source types#297
neilime merged 2 commits intomainfrom
copilot/handle-env-var-argocd-sources

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 9, 2025

The ArgoCD plugin needs to distinguish between single source (.spec.source) and multi-source (.spec.sources[]) manifest formats at runtime.

Changes

  • Single source handling (line 258): Sets ARGOCD_MULTI_SOURCES=0 in plugin env when .spec.source exists
  • Multi-source handling (lines 299-301): Sets ARGOCD_MULTI_SOURCES=1 in plugin env when .spec.sources[] exists
  • Test fixtures: Added ARGOCD_MULTI_SOURCES placeholder to templates and expected values to test outputs

Behavior

The environment variable is injected into the hoverkraft-deployment plugin configuration alongside HOVERKRAFT_DEPLOYMENT_ID:

plugin:
  name: hoverkraft-deployment
  env:
    - name: HOVERKRAFT_DEPLOYMENT_ID
      value: "999"
    - name: ARGOCD_MULTI_SOURCES
      value: "0"  # or "1" for multi-source

Only matching sources (by chart name and repoURL) are updated; unrelated sources in multi-source manifests remain unchanged.

Original prompt

On action.yml:255-258, We should handle the env var ARGOCD_MULTI_SOURCES=0 for single source and ARGOCD_MULTI_SOURCES=1 for multi sources


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: neilime <314088+neilime@users.noreply.github.com>
Copilot AI changed the title [WIP] Handle ARGOCD_MULTI_SOURCES environment variable Add ARGOCD_MULTI_SOURCES environment variable to distinguish source types Dec 9, 2025
Copilot AI requested a review from neilime December 9, 2025 22:27
@neilime neilime marked this pull request as ready for review December 9, 2025 22:28
@neilime neilime changed the title Add ARGOCD_MULTI_SOURCES environment variable to distinguish source types feat(deploy/argocd-manifest-files): add ARGOCD_MULTI_SOURCES environment variable to distinguish source types Dec 9, 2025
@neilime neilime merged commit 286d735 into main Dec 9, 2025
28 of 40 checks passed
@neilime neilime deleted the copilot/handle-env-var-argocd-sources branch December 9, 2025 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants