Skip to content

Commit 59291bd

Browse files
committed
wip
1 parent d35b31e commit 59291bd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

scripts/azure-vn/deployment/generate-deployment-artifacts.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@ fi
7979
# note that the EnclaveId is generated by generate.py on the raw policy, not the base64 version
8080
POLICY_DIGEST_FILE=azure-vn-operator-digest-$VERSION_NUMBER.txt
8181
az confcom acipolicygen --virtual-node-yaml ${OUTPUT_DIR}/operator.yaml --print-policy > ${INPUT_DIR}/policy.base64
82+
if [[ $? -ne 0 ]]; then
83+
echo "Failed to generate ACI policy"
84+
exit 1
85+
fi
86+
8287
base64 -di < ${INPUT_DIR}/policy.base64 > ${INPUT_DIR}/generated.rego
8388
sed -i "s#allow_environment_variable_dropping := true#allow_environment_variable_dropping := false#g" ${INPUT_DIR}/generated.rego
8489
sed -i 's#{"pattern":"DEPLOYMENT_ENVIRONMENT=DEPLOYMENT_ENVIRONMENT_PLACEHOLDER","required":false,"strategy":"string"}#{"pattern":"DEPLOYMENT_ENVIRONMENT=.+","required":false,"strategy":"re2"}#g' generated.rego

0 commit comments

Comments
 (0)