Allow getthelogs to fetch job logs from rdoproject

CI job logs from logs.rdoproject.org use another
console log name and there is no ending '/log' in the URLs.

It would be nice to be able to collect those logs for
tripleo CI jobs as well.

Change-Id: I137cd3eb749f24cb72bb675faca625a0f1f68000
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
This commit is contained in:
Bogdan Dobrelya 2018-01-19 10:23:18 +01:00
parent f4b01304ba
commit 400860df14
1 changed files with 7 additions and 2 deletions

View File

@ -40,13 +40,17 @@ trap finish EXIT SIGINT SIGTERM
WORKERS=6
BASEURL=${1%/}
SC=$(dirname $BASEURL | grep -o \/ | wc -w)
if [[ ! $(basename $BASEURL) == 'logs' && SC -le 7 ]]; then
if [[ $BASEURL =~ 'logs.rdoproject' && SC -le 9 ]] ||\
[[ $BASEURL =~ 'logs.rdoproject.org/openstack-periodic' && SC -le 5 ]]; then
console="$BASEURL/console.txt.gz"
elif [[ ! $(basename $BASEURL) == 'logs' && SC -le 7 ]]; then
console="$BASEURL/job-output.txt.gz"
BASEURL=${BASEURL}/logs
else
console=''
fi
TDIR=${BASEURL##*http://}
TDIR=${TDIR##*https://}
TDIR=/tmp/${TDIR}
mkdir -p $TDIR
cd /tmp
@ -63,7 +67,8 @@ for d in $list_to_get; do
args="\"-nv -nc --no-use-server-timestamps \
--accept-regex='\.txt\.gz$|messages$' \
--reject='index.html*' \
--recursive -l 10 --domains logs.openstack.org --no-parent \
--recursive -l 10 --domains logs.openstack.org,logs.rdoproject.org \
--no-parent \
-erobots=off --wait 0.25 ${d}\""
echo "${args}" >> wget-jobs.txt
done