jenkins-common: move workspace to /tmp/jenkins when build outside jenkins

When users building the scripts, the WORKSPACE variable must be set. Increase the overview
of created folders and files by using a subdirectory in /tmp

Change-Id: I8a139ef2d23dd8115191e51e86ef0346cb97e4cf
This commit is contained in:
Alexander Couzens 2018-03-27 18:07:04 +02:00
parent 7fa1b6e1de
commit 228108f31b
1 changed files with 2 additions and 1 deletions

View File

@ -21,7 +21,8 @@ fi
# non-jenkins execution: put logs in /tmp
if [ "x$WORKSPACE" = "x" ]; then
WORKSPACE=/tmp
WORKSPACE=/tmp/jenkins
mkdir -p "$WORKSPACE"
fi
# non-jenkins execution: put logs in /tmp