From 7aefe59907f092f4db62280b5d8d075576bab375 Mon Sep 17 00:00:00 2001 From: Igor Karpukhin Date: Mon, 24 Mar 2025 09:33:53 +0100 Subject: [PATCH 1/3] Removed redundant diff --- .github/workflows/sync-helm-charts.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/sync-helm-charts.yaml b/.github/workflows/sync-helm-charts.yaml index bfa897b146..220f883888 100644 --- a/.github/workflows/sync-helm-charts.yaml +++ b/.github/workflows/sync-helm-charts.yaml @@ -76,7 +76,6 @@ jobs: echo "Checking for changes in the Chart: $dir" if [[ -n $(diff -r "./helm-charts/$dir" "./helm-charts-cloned/charts/$dir") ]]; then echo "> Changes detected for the Chart: $dir" - diff -r "./helm-charts/$dir" "./helm-charts-cloned/charts/$dir" cp -r "./helm-charts/$dir" "./helm-charts-cloned/charts/$dir" else echo "> No changes detected for the Chart: $dir" From b8e17c424d2f9fd6249fcc88fed2a1e5d6651fe4 Mon Sep 17 00:00:00 2001 From: Igor Karpukhin Date: Mon, 24 Mar 2025 10:28:15 +0100 Subject: [PATCH 2/3] Replaced sed with AWK --- .github/workflows/sync-helm-charts.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sync-helm-charts.yaml b/.github/workflows/sync-helm-charts.yaml index 220f883888..b9dff9e9e8 100644 --- a/.github/workflows/sync-helm-charts.yaml +++ b/.github/workflows/sync-helm-charts.yaml @@ -44,9 +44,7 @@ jobs: path: helm-charts-cloned persist-credentials: true - - name: Patch original AKO chart dependencies - run: | - sed -i 's|repository: "file://../../helm-charts/atlas-operator-crds"|repository: "https://mongodb.github.io/helm-charts"|' helm-charts/atlas-operator/Chart.yaml + #awk '{gsub(/repository: "file:\/\/..\/..\/helm-charts\/atlas-operator-crds"/, "repository: \"https://mongodb.github.io/helm-charts\"")}1' helm-charts/atlas-operator/Chart.yaml > temp.yaml && mv temp.yaml helm-charts/atlas-operator/Chart.yaml - name: Generate AKO bundle env: @@ -68,6 +66,10 @@ jobs: run: | devbox run -- "make helm-upd-rbac" + - name: Patch original AKO chart dependencies + run: | + awk '{gsub(/repository: *"file:\/\/..\/..\/helm-charts\/atlas-operator-crds"/, "repository: \"https://mongodb.github.io/helm-charts\"")}1' helm-charts/atlas-operator/Chart.yaml > temp.yaml && mv temp.yaml helm-charts/atlas-operator/Chart.yaml + - name: Verify if helm-charts need to be synced run: | for dir in ./helm-charts/*; do From da9ac143ce1e9b1de11df9ab245d7a1b57896c0e Mon Sep 17 00:00:00 2001 From: Igor Karpukhin Date: Mon, 24 Mar 2025 10:28:46 +0100 Subject: [PATCH 3/3] Removed comment --- .github/workflows/sync-helm-charts.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/sync-helm-charts.yaml b/.github/workflows/sync-helm-charts.yaml index b9dff9e9e8..9e1efc205e 100644 --- a/.github/workflows/sync-helm-charts.yaml +++ b/.github/workflows/sync-helm-charts.yaml @@ -44,8 +44,6 @@ jobs: path: helm-charts-cloned persist-credentials: true - #awk '{gsub(/repository: "file:\/\/..\/..\/helm-charts\/atlas-operator-crds"/, "repository: \"https://mongodb.github.io/helm-charts\"")}1' helm-charts/atlas-operator/Chart.yaml > temp.yaml && mv temp.yaml helm-charts/atlas-operator/Chart.yaml - - name: Generate AKO bundle env: VERSION: "1.0.0"