pipelines: improve yaml validation

This commit is contained in:
ilike2burnthing 2022-08-19 23:30:26 +01:00 committed by GitHub
parent dbc9dea7a3
commit 01c77ee1fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -375,15 +375,14 @@ stages:
# set fail as false
fail=0
ajv test -d "src/Jackett.Common/Definitions/*.yml" -s "src/Jackett.Common/Definitions/schema.json" --valid --all-errors -c ajv-formats
testresult=$?
if [ "$testresult" -ne 0 ]; then
if [ "$?" -eq 1 ]; then
fail=1
fi
if [ "$fail" -ne 0 ]; then
if [ "$fail" -eq 1 ]; then
echo "Validation Failed"
exit 1
fi
echo "Validation Success"
echo "Validation Successful"
exit 0
- stage: UnitTestJackett