Skip to content

Octopus Argo CD Application Manifests step completely deletes the ArgoCD Source folder and doesnt replace it when using the Purge Argo CD Source Folder option. #9982

@Clare-Octopus

Description

@Clare-Octopus

Severity

Blocking customers, and also deletes the Argo application!

Version

2026.2.5959

Latest Version

I could reproduce the problem in the latest build

What happened?

When using the Update Argo CD Application Manifests step and choosing the Purge Argo CD Source Folder option. Octopus will fully delete the source folder used for the Argo Application and doesnt replace it with the files included in the commit.

We state in our documentation on Purge Argo CD Source Folder here that:

Purging the source folder clears the Path directory of the Argo CD Application’s repository prior to adding newly templated files.

So we should be deleting the Path directory but then replacing it with the files from the Git commit.

Octopus Step Configuration:

Image

Project Variables:

Image

Pre-Octopus Deployment:

Image

Post-Octopus Deployment with the Purge Argo CD Source Folder enabled (notice the helm-myapp-cloud-dev folder - which was the Source folder for the Argo Application - has been completely deleted and doesnt get put back!

Image
I have tried the options below and ALL options completely delete the ArgoCD Source folder and does not re-create it:
  • Tried sourcing the Files from a Package instead of a Git repository.
  • Tried creating a file in the template repository folder in Git (rather than updating a file).
  • Tried changing my variable value so the Path was repositoryfolder/file aka helm-myapp-cloud-dev-template/dev_values.yaml

Reproduction

  1. Ensure you have an Argo instance connected to Octopus, with Argo Applications sourced from Git.
  2. Create an Octopus Project and have an Update Argo CD Application Manifests step and set it to use the `Purge Argo CD Source Folder.
  3. Setup annotations for that project in Argo for the application you want to update.
  4. Ensure you update a file in a git template folder (where you have set the PATH to in the Octopus step) so there is a commit hash for Octopus to use.
  5. Create a release and deploy it, see the Argo source folder in Git be deleted and not re-created. Then see the Argo Application go out of sync.

Error and Stacktrace

N/A

More Information

Initial Ticket (Internal) - https://octopuscd.zendesk.com/agent/tickets/200965
Rnd (Internal) - https://octopusdeploy.slack.com/archives/CNHBHV2BX/p1777290721323679
Reproduction (Internal) - https://octopus-operations.octopus.app/app#/Spaces-422/projects/testargomanifestvalues/deployments/releases/0.0.46/deployments/Deployments-114126

Workaround

Do not purge the ArgoCD folder.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugThis issue represents a verified problem we are committed to solving

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions