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! ๐