Skip to content

Commit

Permalink
refactor: define sync target in distro folder
Browse files Browse the repository at this point in the history
  • Loading branch information
kb-newrelic committed Feb 13, 2025
1 parent 43e529b commit 9db58af
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-config-drift.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ jobs:

- name: Sync k8s distro configs from helm chart
run: |
make k8s-configs-sync-check
make -f ./distributions/nrdot-collector-k8s/Makefile sync-configs
15 changes: 0 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -104,18 +104,3 @@ licenses-check: licenses
exit 1;\
} \
|| exit 0

.PHONY: sync-k8s-configs
sync-k8s-configs:
@./distributions/nrdot-collector-k8s/sync-configs.sh

.PHONY: check-k8s-configs
check-k8s-configs: sync-k8s-configs
@git diff --name-only | grep -E 'distributions\/nrdot-collector-k8s\/config-\w*.yaml' \
&& { \
echo "Collector configs in helm chart have changed. Adjust sync script to take changes into account.";\
echo "Diff of $(NOTICE_OUTPUT):";\
git --no-pager diff HEAD -- 'distributions/nrdot-collector-k8s/config-*.yaml';\
exit 1;\
} \
|| exit 0
16 changes: 16 additions & 0 deletions distributions/nrdot-collector-k8s/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
THIS_MAKEFILE_DIR := $(realpath $(dir $(realpath $(lastword $(MAKEFILE_LIST)))))

.PHONY: sync-configs
sync-configs:
@${THIS_MAKEFILE_DIR}/sync-configs.sh

.PHONY: check-k8s-configs
check-k8s-configs: sync-configs
@git diff --name-only | grep -E 'distributions\/nrdot-collector-k8s\/config-\w*.yaml' \
&& { \
echo "Collector configs in helm chart have changed. Adjust sync script to take changes into account.";\
echo "Diff of $(NOTICE_OUTPUT):";\
git --no-pager diff HEAD -- 'distributions/nrdot-collector-k8s/config-*.yaml';\
exit 1;\
} \
|| exit 0

0 comments on commit 9db58af

Please sign in to comment.