Fixes the following problem on new slaves:
chown: cannot access '/home/jenkins/.cache': No such file or directory
Change-Id: Ia461acd44466819e47a459e23ee6fd47ac1bad69
Signed-off-by: Markos Chandras <mchandras@suse.de>
if [ -z "${JOB_URL+x}" ]; then
echo "Not running as part of Jenkins. Handle the logs manually."
else
+ # Make sure cache exists
+ [[ ! -d ${HOME}/.cache ]] && mkdir ${HOME}/.cache
+
sudo chown -R jenkins:jenkins $WORKSPACE
sudo chown -R jenkins:jenkins ${HOME}/.cache
fi