jenkins: ensure valid locale is set before running

This prevents the dreaded "Content is not allowed in prolog" errors when
running gradle.  C.UTF-8 is a Debian thing that is not supported everywhere
including Java.

fdroid/basebox#9
This commit is contained in:
Hans-Christoph Steiner 2018-09-24 12:15:46 +02:00
parent 6d842b8429
commit ecb6987cda
3 changed files with 15 additions and 0 deletions

View File

@ -18,6 +18,11 @@ if [ -z $WORKSPACE ]; then
export WORKSPACE=`pwd`
fi
if [ -z $LC_ALL ] || [ $LC_ALL == "C.UTF-8" ] || [[ $LC_ALL != *.UTF-8 ]]; then
export LC_ALL=en_US.UTF-8
echo "Forcing locale to $LC_ALL"
fi
set -e
set -x

View File

@ -12,6 +12,11 @@ if [ -z $WORKSPACE ]; then
WORKSPACE=`pwd`
fi
if [ -z $LC_ALL ] || [ $LC_ALL == "C.UTF-8" ] || [[ $LC_ALL != *.UTF-8 ]]; then
export LC_ALL=en_US.UTF-8
echo "Forcing locale to $LC_ALL"
fi
# make sure that no VirtualBox processes are left running
cleanup_all() {
set +e

View File

@ -17,6 +17,11 @@ if [ -z $WORKSPACE ]; then
export WORKSPACE=`pwd`
fi
if [ -z $LC_ALL ] || [ $LC_ALL == "C.UTF-8" ] || [[ $LC_ALL != *.UTF-8 ]]; then
export LC_ALL=en_US.UTF-8
echo "Forcing locale to $LC_ALL"
fi
set -e
set -x