From 2cd2f3020102ca8052b755380310cba1d587a38f Mon Sep 17 00:00:00 2001 From: Robert Klonner Date: Sun, 4 Jan 2026 10:35:56 +0100 Subject: [PATCH 1/3] Include new page in the navigation --- mkdocs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/mkdocs.yml b/mkdocs.yml index 53f480ab..f4d8056b 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -22,6 +22,7 @@ nav: - Overview: index.md - Demo: demo.md - How it works: how-it-works.md +- Examples: examples.md - Getting started: - getting-started/github-actions-workflow.md - getting-started/gitlab-cicd.md From 07411d9bf8cedf0c2f0e09280a29e58a77e363a4 Mon Sep 17 00:00:00 2001 From: Robert Klonner Date: Sun, 4 Jan 2026 10:36:45 +0100 Subject: [PATCH 2/3] Add initial version of examples page --- docs/examples.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 docs/examples.md diff --git a/docs/examples.md b/docs/examples.md new file mode 100644 index 00000000..56a1b3aa --- /dev/null +++ b/docs/examples.md @@ -0,0 +1,42 @@ +# Examples + +The following examples are a selection of possible `argocd-diff-preview` use-cases and demonstrate the functionality of the tool. Every example has a [linked pull request in the repository](https://github.com/dag-andersen/argocd-diff-preview/pulls?q=is%3Apr+is%3Aopen+example) where `argocd-diff-preview` is executed to visualize the outcome as pull request comment. + +## Collection +| Name | Task | Result | +|-|-|-| +| [example-helm-external-chart](https://github.com/dag-andersen/argocd-diff-preview/pull/15) | Modify the target revision of an ArgoCD application that deploys an external helm chart. Check what changed in the external helm chart by reviewing the rendered application. | `argocd-diff-preview` shows the differences of the helm chart that happend "under the hood". | +| [example-applicationset-refactoring](https://github.com/dag-andersen/argocd-diff-preview/pull/296) | Modify an existing applicationset and move from a List Generator to a Git Generator to derive the environments. Ensure your changes work by reviewing the rendered applications. | This example demonstrates a "Zero change" pull request, so the refactoring is successful when it yields the same ArgoCD applications. The analysis of `argocd-diff-preview` states **No changes found** which confirms the expected result. | + +## Run the examples locally + +**Prerequisites** +* Docker +* Git + +You can play through the examples locally by setting the respective `TARGET_BRANCH` variable to point to an example branch + +```bash +TARGET_BRANCH=example-applicationset-refactoring +``` + +and then execute the following commands: + + +```bash +TARGET_BRANCH=example-applicationset-refactoring + +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 $TARGET_BRANCH + +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=$TARGET_BRANCH \ + -e REPO=dag-andersen/argocd-diff-preview \ + dagandersen/argocd-diff-preview:v0.1.21 +``` \ No newline at end of file From 208ca81276fb55e661ba4ebc65d75c9f6fcb5e97 Mon Sep 17 00:00:00 2001 From: Robert Klonner Date: Sun, 4 Jan 2026 10:57:22 +0100 Subject: [PATCH 3/3] Fix bullet points --- docs/examples.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/examples.md b/docs/examples.md index 56a1b3aa..592d26d8 100644 --- a/docs/examples.md +++ b/docs/examples.md @@ -11,6 +11,7 @@ The following examples are a selection of possible `argocd-diff-preview` use-cas ## Run the examples locally **Prerequisites** + * Docker * Git