Commit 30bc4bb9 authored by Daniele Venzano's avatar Daniele Venzano
Browse files

Add ZApp validation and fix missing key

parent 78ec78b4
Pipeline #4049 failed with stage
in 14 seconds
...@@ -17,6 +17,7 @@ images: ...@@ -17,6 +17,7 @@ images:
script: script:
- bash build_all.sh - bash build_all.sh
- python gen_json.py - python gen_json.py
- validate_all.sh
artifacts: artifacts:
paths: paths:
- "*.json" - "*.json"
......
...@@ -75,7 +75,8 @@ def boinc_service(memory_limit, core_limit, project_key, project_url): ...@@ -75,7 +75,8 @@ def boinc_service(memory_limit, core_limit, project_key, project_url):
'command': None, 'command': None,
'total_count': 1, 'total_count': 1,
'essential_count': 1, 'essential_count': 1,
'startup_order': 0 'startup_order': 0,
'replicas': 1
} }
return service return service
......
#!/bin/bash
set -e
VALIDATION_URL=${VALIDATION_URL:-http://localhost:5001/api/0.7/zapp_validation}
tempfile=`mktemp`
trap "{ rm -f $tempfile; }" EXIT
for json in *.json; do
echo '{"application":' > $tempfile
cat $json >> $tempfile
echo '}' >> $tempfile
if ! curl -s -X POST -H "Content-Type: application/json" -d @$tempfile -w "code:%{http_code}" -o $tempfile $VALIDATION_URL | grep 'code:200'; then
printf "`cat $tempfile`"
echo
exit 1
fi
done
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment