Skip to content

Try demo locally with 3 simple commands!

First, make sure Docker is running. Run docker ps to check if it's running.

Second, run the following 3 commands:

git clone https://github.com/dag-andersen/argocd-diff-preview base-branch --depth 1 -q 

git clone https://github.com/dag-andersen/argocd-diff-preview target-branch --depth 1 -q -b helm-example-3

docker run \
   --network host \
   -v /var/run/docker.sock:/var/run/docker.sock \
   -v $(pwd)/output:/output \
   -v $(pwd)/base-branch:/base-branch \
   -v $(pwd)/target-branch:/target-branch \
   -e TARGET_BRANCH=helm-example-3 \
   -e REPO=dag-andersen/argocd-diff-preview \
   dagandersen/argocd-diff-preview:v0.1.11

and the output would be something like this:

โœจ Running with:
โœจ - local-cluster-tool: Kind
โœจ - base-branch: main
โœจ - target-branch: helm-example-3
โœจ - secrets-folder: ./secrets
โœจ - output-folder: ./output
โœจ - repo: dag-andersen/argocd-diff-preview
โœจ - timeout: 180 seconds
๐Ÿš€ Creating cluster...
๐Ÿš€ Cluster created successfully
๐Ÿฆ‘ Installing Argo CD Helm Chart version: 'latest'
๐Ÿฆ‘ Installing Argo CD Helm Chart
๐Ÿฆ‘ Waiting for Argo CD to start...
๐Ÿฆ‘ Argo CD is now available
๐Ÿฆ‘ Logging in to Argo CD through CLI...
๐Ÿฆ‘ Argo CD installed successfully
๐Ÿคท No secrets found in ./secrets
๐Ÿค– Fetching all files in dir: base-branch
๐Ÿค– Patching applications for branch: main
๐Ÿค– Patching 4 Argo CD Application[Sets] for branch: main
๐Ÿค– Fetching all files in dir: target-branch
๐Ÿค– Patching applications for branch: helm-example-3
๐Ÿค– Patching 4 Argo CD Application[Sets] for branch: helm-example-3
๐ŸŒš Getting resources from base
โณ Waiting for 4 out of 4 applications to become 'OutOfSync'. Retrying in 5 seconds. Timeout in 180 seconds...
๐ŸŒš Got all resources from 4 applications for base
๐Ÿงผ Removing applications
๐Ÿงผ Removed applications successfully
๐ŸŒš Getting resources from target
โณ Waiting for 3 out of 4 applications to become 'OutOfSync'. Retrying in 5 seconds. Timeout in 180 seconds...
๐ŸŒš Got all resources from 4 applications for target
๐Ÿ’ฅ Deleting cluster...
๐Ÿ”ฎ Generating diff between main and helm-example-3
๐Ÿ™ Please check the ./output/diff.md file for differences
๐ŸŽ‰ Done in 99 seconds

Finally, you can view the diff by running cat ./output/diff.md. The diff should look something like this

Questions, issues, or suggestions

If you experience issues or have any questions, please open an issue in the repository! ๐Ÿš€