mirror of
https://github.com/YunoHost/tartiflette.git
synced 2024-09-03 20:06:08 +02:00
Fix applist + correctlt interpret test results
This commit is contained in:
parent
ae05f42bb7
commit
c2000c47cd
5 changed files with 59 additions and 103 deletions
|
@ -18,6 +18,9 @@ def main():
|
||||||
data["name"] = app
|
data["name"] = app
|
||||||
data["statuses"] = []
|
data["statuses"] = []
|
||||||
|
|
||||||
|
if len(appdata.split("\n")) != 2:
|
||||||
|
print "Ignoring %s - bad/unavailable data" % app
|
||||||
|
continue
|
||||||
applevel = appdata.split("\n")[1][0]
|
applevel = appdata.split("\n")[1][0]
|
||||||
appdata = appdata.split("\n")[0]
|
appdata = appdata.split("\n")[0]
|
||||||
data["level"] = int(applevel)
|
data["level"] = int(applevel)
|
||||||
|
@ -39,7 +42,7 @@ def main():
|
||||||
|
|
||||||
apps.append(data)
|
apps.append(data)
|
||||||
|
|
||||||
apps.sort(key=lambda a: (a["level"], a["statusescore"], a["name"])), reverse=True)
|
apps.sort(key=lambda a: (a["level"], a["statusescore"], a["name"]), reverse=True)
|
||||||
|
|
||||||
with open("apps.json", "w") as f:
|
with open("apps.json", "w") as f:
|
||||||
json.dump(apps, f)
|
json.dump(apps, f)
|
||||||
|
|
98
appci/apps
98
appci/apps
|
@ -1,98 +0,0 @@
|
||||||
243 (Community)
|
|
||||||
abantecart (Community)
|
|
||||||
adminer (Community)
|
|
||||||
agendav (Official)
|
|
||||||
ampache (Community)
|
|
||||||
baikal (Official)
|
|
||||||
bozon (Community)
|
|
||||||
chtickynotes (Community)
|
|
||||||
cops (Community)
|
|
||||||
couchpotato (Community)
|
|
||||||
cryptpad (Community)
|
|
||||||
Cubiks-2048 (Community)
|
|
||||||
dokuwiki (Official)
|
|
||||||
etherpad mypads (Community)
|
|
||||||
filebin (Community)
|
|
||||||
framagames (Community)
|
|
||||||
freshrss (Community)
|
|
||||||
garradin (Community)
|
|
||||||
glowing bear (Community)
|
|
||||||
gogs (Community)
|
|
||||||
grafana (Community)
|
|
||||||
hextris (Official)
|
|
||||||
hotspot (Community)
|
|
||||||
htmltools (Community)
|
|
||||||
hubzilla (Community)
|
|
||||||
ihatemoney (Community)
|
|
||||||
jappix (Community)
|
|
||||||
jeedom (Community)
|
|
||||||
jenkins (Community)
|
|
||||||
jirafeau (Official)
|
|
||||||
Joomla (Community)
|
|
||||||
kanboard (Official)
|
|
||||||
keeweb (Community)
|
|
||||||
kiwiirc (Community)
|
|
||||||
laverna (Community)
|
|
||||||
LBCAlerte (Community)
|
|
||||||
leed (Community)
|
|
||||||
lektor (Community)
|
|
||||||
libresonic (Community)
|
|
||||||
limesurvey (Community)
|
|
||||||
linuxdash (Community)
|
|
||||||
lstu (Community)
|
|
||||||
lufi (Community)
|
|
||||||
lutim (Community)
|
|
||||||
mattermost (Community)
|
|
||||||
minchat (Community)
|
|
||||||
minidlna (Community)
|
|
||||||
monica (Community)
|
|
||||||
monit (Community)
|
|
||||||
monitorix (Community)
|
|
||||||
movim (Community)
|
|
||||||
multi webapp (Community)
|
|
||||||
mumbleserver (Community)
|
|
||||||
my webapp (Official)
|
|
||||||
mytinytodo (Community)
|
|
||||||
netdata (Community)
|
|
||||||
nextcloud (Official)
|
|
||||||
nexusoss (Community)
|
|
||||||
opensondage (Official)
|
|
||||||
osjs (Community)
|
|
||||||
owncloud (Community)
|
|
||||||
phpmyadmin (Official)
|
|
||||||
phpsysinfo (Community)
|
|
||||||
piratebox (Community)
|
|
||||||
piwigo (Community)
|
|
||||||
radicale (Community)
|
|
||||||
rainloop (Official)
|
|
||||||
riot (Community)
|
|
||||||
roundcube (Official)
|
|
||||||
rss-bridge (Community)
|
|
||||||
scrumblr (Community)
|
|
||||||
seafile (Community)
|
|
||||||
searx (Official)
|
|
||||||
shaarli (Community)
|
|
||||||
shellinabox (Official)
|
|
||||||
shout (Community)
|
|
||||||
shuri (Community)
|
|
||||||
simpad (Community)
|
|
||||||
spip (Community)
|
|
||||||
spip2 (Community)
|
|
||||||
staticwebapp (Community)
|
|
||||||
strut (Official)
|
|
||||||
synapse (Community)
|
|
||||||
tagspaces (Community)
|
|
||||||
torclient (Community)
|
|
||||||
transmission (Official)
|
|
||||||
ttrss (Official)
|
|
||||||
vpnclient (Community)
|
|
||||||
wallabag2 (Official)
|
|
||||||
webapp multi (Community)
|
|
||||||
Webtrees (Community)
|
|
||||||
wordpress (Official)
|
|
||||||
yourls (Community)
|
|
||||||
Youtube-dl-WebUI (Community)
|
|
||||||
yunofav (Community)
|
|
||||||
z-push (Community)
|
|
||||||
zerobin (Official)
|
|
||||||
zeronet (Community)
|
|
|
@ -1,16 +1,36 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
python fetchlist.py | sort > list_apps
|
||||||
|
|
||||||
while read APP;
|
while read APP;
|
||||||
do
|
do
|
||||||
APPNAME=$(echo $APP | awk '{print $1}')
|
APPNAME=$(echo $APP | awk '{print $1}')
|
||||||
echo $APPNAME
|
echo $APPNAME
|
||||||
wget -q -O data/$APPNAME "https://ci-apps.yunohost.org/jenkins/job/$APP/lastBuild/consoleText" --prefer-family=IPv4
|
wget -q -O data/$APPNAME "https://ci-apps.yunohost.org/jenkins/job/$APP/lastBuild/consoleText" --prefer-family=IPv4
|
||||||
|
|
||||||
CHECKS=$(cat data/$APPNAME | grep "Package linter:" -A15 | tail -n 16 | sed -e 's/FAIL/0/g' -e 's/SUCCESS/1/g' -e 's/Not evaluated./X/' | awk '{print $NF}' | tr -d '\n')
|
TESTS_RESULTS=""
|
||||||
LEVELS=$(cat data/$APPNAME | grep 'Level of this application' -A10 | 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')
|
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
|
||||||
|
|
||||||
echo $CHECKS > data/$APPNAME
|
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
|
echo $LEVELS >> data/$APPNAME
|
||||||
|
|
||||||
done < apps
|
done < list_apps
|
||||||
|
|
||||||
|
|
15
appci/fetchlist.py
Normal file
15
appci/fetchlist.py
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
|
||||||
|
import os
|
||||||
|
import json
|
||||||
|
import requests
|
||||||
|
|
||||||
|
official = json.loads(requests.get("https://raw.githubusercontent.com/YunoHost/apps/master/official.json").text)
|
||||||
|
community = json.loads(requests.get("https://raw.githubusercontent.com/YunoHost/apps/master/community.json").text)
|
||||||
|
|
||||||
|
official_apps = [ os.path.basename(app["url"]).replace("_ynh", "")+" (Official)" for app in official.values() ]
|
||||||
|
community_apps = [ os.path.basename(app["url"]).replace("_ynh", "")+" (Community)" for app in community.values() if app["state"] == "working" ]
|
||||||
|
|
||||||
|
for app in official_apps:
|
||||||
|
print app
|
||||||
|
for app in community_apps:
|
||||||
|
print app
|
16
appci/list_tests
Normal file
16
appci/list_tests
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
Package linter
|
||||||
|
Installation
|
||||||
|
Deleting
|
||||||
|
Installation in a sub path
|
||||||
|
Deleting from a sub path
|
||||||
|
Installation on the root
|
||||||
|
Deleting from root
|
||||||
|
Upgrade
|
||||||
|
Installation in private mode
|
||||||
|
Installation in public mode
|
||||||
|
Multi-instance installations
|
||||||
|
Malformed path
|
||||||
|
Port already used
|
||||||
|
Backup
|
||||||
|
Restore
|
||||||
|
Change URL
|
Loading…
Reference in a new issue