From e9ba081111ced93a8ecb5972a024e235d9e8fff7 Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Tue, 29 Nov 2016 12:34:36 +0000 Subject: jjb: infra: bifrost-verify.sh: Make sure the cache directory exists 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 --- jjb/infra/bifrost-verify.sh | 3 +++ 1 file changed, 3 insertions(+) (limited to 'jjb/infra/bifrost-verify.sh') diff --git a/jjb/infra/bifrost-verify.sh b/jjb/infra/bifrost-verify.sh index ded4ed463..9fbb1d0d9 100755 --- a/jjb/infra/bifrost-verify.sh +++ b/jjb/infra/bifrost-verify.sh @@ -17,6 +17,9 @@ function fix_ownership() { 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 -- cgit 1.2.3-korg