File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,16 @@ function release(){
2727 " $POLICY_ROOT_DIR "
2828}
2929
30+ function runUpdatecliApply(){
31+ local POLICY_ROOT_DIR=" "
32+ POLICY_ROOT_DIR=" $1 "
33+ updatecli apply \
34+ --debug \
35+ --config " $POLICY_ROOT_DIR /updatecli.d" \
36+ --values " $POLICY_ROOT_DIR /values.yaml" \
37+ --values " $POLICY_ROOT_DIR /testdata/values.yaml"
38+ }
39+
3040function runUpdatecliDiff(){
3141 local POLICY_ROOT_DIR=" "
3242 POLICY_ROOT_DIR=" $1 "
@@ -150,6 +160,12 @@ function main(){
150160 exit 0
151161 fi
152162
163+ if [[ " $PARAM " == " --apply-policy" ]]; then
164+ POLICY_ROOT_DIR=" $2 "
165+ runUpdatecliApply " $POLICY_ROOT_DIR "
166+ exit 0
167+ fi
168+
153169 GLOBAL_ERROR=0
154170
155171 for POLICY in $POLICIES
Original file line number Diff line number Diff line change @@ -14,9 +14,15 @@ e2e-test: ## Release checks for each policy if they can be published on ghcr.io
1414
1515.PHONY : validate-policy
1616# # make validate-policy POLICY=policies/apm/apm-data-spec GITHUB_WORKSPACE=/tmp
17- validate-policy : # # Release checks for each policy if they can be published on ghcr.io
17+ validate-policy : # # Validate the given policy
1818 .ci/scripts/release.bash --validate-policy $(POLICY )
1919
20+
21+ .PHONY : apply-policy
22+ # # make apply-policy POLICY=policies/apm/apm-data-spec GITHUB_WORKSPACE=/tmp
23+ apply-policy : # # Run the given policy
24+ .ci/scripts/release.bash --apply-policy $(POLICY )
25+
2026.PHONY : help
2127help : # # Show this Makefile's help
2228 @grep -E '^[a-zA-Z_-]+ :.* ?# # .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
You can’t perform that action at this time.
0 commit comments