File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ OPA_POLICY_DIR=/tmp/opa-policy-$(OPA_POLICY_BRANCH)
44OPA_POLICY_SUBDIR? =opa/kubernetes
55MANIFEST_DIRS: =$(shell find rendered/ -type d -name manifests 2>/dev/null)
66CONSTANTS_APPS_FILE := $(shell mktemp -p /tmp applications.XXXXX.yaml)
7+ CONSTANTS_BACKSTAGE_FILE := $(shell mktemp -p /tmp backstage.XXXXX.json)
78
89.PHONY : opa/check-env opa/clone-policy opa/conftest
910
@@ -31,13 +32,14 @@ ifndef CONSTANTS_URL
3132 $(error CONSTANTS_URL is undefined)
3233endif
3334 @curl --retry 5 --retry-all-errors --fail -s -o $(CONSTANTS_APPS_FILE).curl $(CONSTANTS_URL)/applications.json && yq '{"applications": .}' $(CONSTANTS_APPS_FILE).curl > $(CONSTANTS_APPS_FILE)
35+ @curl --retry 5 --retry-all-errors --fail -s -o $(CONSTANTS_BACKSTAGE_FILE).curl $(CONSTANTS_URL)/backstage.json && jq '{"backstage_components": .components.default | keys}' $(CONSTANTS_BACKSTAGE_FILE).curl > $(CONSTANTS_BACKSTAGE_FILE)
3436
3537# # Validate manifests
3638opa/conftest : satoshi/check-deps opa/clone-policy opa/fetch-constants
3739 @errs=0;
3840 @for dir in $(MANIFEST_DIRS ) ; do \
3941 if ! conftest test --output stdout $$ dir/* .yaml \
40- -d ${CONSTANTS_APPS_FILE} \
42+ -d ${CONSTANTS_APPS_FILE} -d ${CONSTANTS_BACKSTAGE_FILE} \
4143 -p $(OPA_POLICY_DIR ) /opa/kubernetes/policy/utils.rego \
4244 -p $(OPA_POLICY_DIR ) /$(OPA_POLICY_SUBDIR ) ; then \
4345 errs=$$(( $$errs + 1 ) ); \
You can’t perform that action at this time.
0 commit comments