Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to Fix Issues in ACE/TAO Scoreboard #9

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 43 additions & 8 deletions naboo_dre.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,35 @@
#!/bin/bash

set -ue
set -u

if [ -z ${SCOREBOARD_ROOT+defined} ]
then
this_script="${BASH_SOURCE[0]}"
export SCOREBOARD_ROOT=$( cd -- "$( dirname -- "$this_script" )" &> /dev/null && pwd )
cd "$SCOREBOARD_ROOT"
echo "Updating scoreboard at $SCOREBOARD_ROOT..."
git pull || exit 1
# Run this script in a new shell to make sure we're running the latest
# script.
exec "$this_script"
else
echo "Updated scoreboard!"
fi

OUTPUT="${OUTPUT:-/export/web/www/scoreboard}"
echo "Output will be $OUTPUT"
if ! [ -d "$OUTPUT" ]
then
echo "\$OUTPUT directory ($OUTPUT) does not exist"
exit 1
echo "\$OUTPUT directory ($OUTPUT) does not exist"
exit 1
fi

SCOREBOARD_ROOT=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
cd "$SCOREBOARD_ROOT"
git pull

AUTOBUILD_ROOT="${AUTOBUILD_ROOT:-$HOME/autobuild}"
cd "$AUTOBUILD_ROOT"
git pull
echo "Updating autobuild at $AUTOBUILD_ROOT..."
git pull || exit 1

exit_status=0
groups=(
ace
ace6
Expand All @@ -26,6 +39,11 @@ groups=(

# Generate the index page!
/usr/bin/perl ./scoreboard.pl -v -d "$OUTPUT" -i "$SCOREBOARD_ROOT/index.xml"
if [ $? -gt 0 ]
then
echo "STATUS ERROR: scoreboard.pl for index page returned $?" 1>&2
exit_status=1
fi

xml_files=()
for group in ${groups[@]}
Expand All @@ -36,9 +54,19 @@ do

# Generate the normal pages for this group
/usr/bin/perl ./scoreboard.pl -b -d "$OUTPUT" -f "$xml_file" -o "$group.html" -v
if [ $? -gt 0 ]
then
echo "STATUS ERROR: scoreboard.pl for $group pages returned $?" 1>&2
exit_status=1
fi

# Generate the text matrix pages for this group
./matrix.py "${OUTPUT}"
if [ $? -gt 0 ]
then
echo "STATUS ERROR: matrix.py for $group returned $?" 1>&2
exit_status=1
fi

# Remove the builds.json for this group
rm "$OUTPUT/builds.json"
Expand All @@ -54,3 +82,10 @@ function join_by {
fi
}
/usr/bin/perl ./scoreboard.pl -b -d "$OUTPUT" -z -j "$(join_by , ${xml_files[@]})"
if [ $? -gt 0 ]
then
echo "STATUS ERROR: scoreboard.pl for integrated pages returned $?" 1>&2
exit_status=1
fi

exit $exit_status