argocd-example-apps icon indicating copy to clipboard operation
argocd-example-apps copied to clipboard

Add Git tags for recent versions of all Helm/Kustomize apps

Open gw0 opened this issue 3 years ago • 0 comments

In order to demonstrate how you could pin an ArgoCD app to a specific version when using Git (e.g. by referencing targetRevision: charts/helm-guestbook/0.1.0 instead of HEAD), it would make sense that his repository contains Git tags for recent versions of all Helm/Kustomize app.

Snippet to add Git tags for latest version changes to Helm charts:

COMMIT=$(git log -n 1 --pretty=format:%H -- "$CHART_DIR/Chart.yaml")
VERSION=$(awk '/^version: *(.+)$/ { print $2; }' "$CHART_DIR/Chart.yaml")
TAG="charts/$CHART_NAME/$VERSION"
git tag -f "$TAG" "$COMMIT"
git push --tags

gw0 avatar Jan 25 '22 11:01 gw0