Last active
February 20, 2019 20:44
-
-
Save mcupak/e5aa4352b4651f11d05a73b7c65fecb1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
script: | |
# validate | |
- echo "Validating $URL_TO_VALIDATE:" | |
- VALIDATION_OUTPUT=`curl -sS "$VALIDATOR_URL=$URL_TO_VALIDATE"` | |
# print validation errors | |
- echo $VALIDATION_OUTPUT | |
# check if the validation output ignoring warnings is an empty array | |
- VALIDATION_ERROR_COUNT=`echo "$VALIDATION_OUTPUT" |jq -c '.schemaValidationMessages // [] | map(select(.level != "warning"))' |jq length` | |
- test "$VALIDATION_ERROR_COUNT" == 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment