dag-andersen / argocd-diff-preview

Tool for rendering manifest changes on pull requests.
Apache License 2.0
175 stars 10 forks source link

Support multiple sources #58

Closed rikez closed 3 weeks ago

rikez commented 3 weeks ago

Hello,

Does it currently support diffing when an Application depends on multiple git repo sources?

Suppose I have the following config in https://github.com/argocd-repo.git.

sources:
  - repoURL: "charts.internal"
    chart: "chart1"
    targetRevision: "0.1.0"
    helm:
      releaseName: "chart1"
      valueFiles:
        - "values.yaml"
        - "$externalValues/path/to/values.yaml"
  - repoURL: "https://github.com/values-repo.git"
    ref: externalValues
    targetRevision: HEAD

I tried, but it looks like the REPO environment variable is checked against all repoURL git sources.

dag-andersen commented 3 weeks ago

Hi @rikez,

Yes, multiple sources are supported!

I tried, but it looks like the REPO environment variable is checked against all repoURL git sources.

You're correct; the REPO environment variable is indeed checked against all repoURL sources, so it should render an accurate diff whenever you update the file: /path/to/values.yaml.

From the code snippet you shared, everything looks good to me!

Could you provide more details on what you tried and the issue you encountered? For example, were you expecting a specific behavior that didn't occur? This will help me better understand what might be going wrong.

rikez commented 3 weeks ago

@dag-andersen Apologies, it was a misconfiguration on my side. It's working fine. Thanks for the quick reply anyways.

I will close this issue.