mirror of
https://github.com/YunoHost/tartiflette.git
synced 2024-09-03 20:06:08 +02:00
43 lines
1.1 KiB
Bash
Executable file
43 lines
1.1 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
python fetchlist.py | sort > list_apps
|
|
|
|
while read APP;
|
|
do
|
|
APPNAME=$(echo $APP | awk '{print $1}')
|
|
echo $APPNAME
|
|
wget -q -O data/$APPNAME "https://ci-apps.yunohost.org/jenkins/job/$APP/lastBuild/consoleText" --prefer-family=IPv4
|
|
|
|
TESTS_RESULTS=""
|
|
while read TESTNAME
|
|
do
|
|
RESULTS=$(grep "^$TESTNAME:" data/$APPNAME)
|
|
if echo $RESULTS | grep -q "FAIL"
|
|
then
|
|
TESTS_RESULTS="${TESTS_RESULTS}0"
|
|
elif echo $RESULTS | grep -q "SUCCESS"
|
|
then
|
|
TESTS_RESULTS="${TESTS_RESULTS}1"
|
|
else
|
|
TESTS_RESULTS="${TESTS_RESULTS}X"
|
|
fi
|
|
done < list_tests
|
|
|
|
# Get the level of this application and the value of each level
|
|
LEVELS=$(grep -A10 'Level of this application' data/$APPNAME \
|
|
| tail -n11 \
|
|
| sed 's/.*: \| (.*//g' \
|
|
| sed 's@N/A@X@g' \
|
|
| tr -d '\n')
|
|
|
|
# LEVELS=$(grep -A10 'Level of this application' data/$APPNAME \
|
|
# | tail -n 11 \
|
|
# | sed -e 's@N/A@X@g' -e 's/ Level //g' -e 's/Level of this application//g' \
|
|
# | awk '{print $2}' \
|
|
# | tr -d '\n')
|
|
|
|
echo $TESTS_RESULTS > data/$APPNAME
|
|
echo $LEVELS >> data/$APPNAME
|
|
|
|
done < list_apps
|
|
|