jenkins/common: prevent cleaning when directory is not existing
Signed-off-by: Marc Mattmueller <marc.mattmueller@netmodule.com>
This commit is contained in:
parent
c40dcce3d5
commit
d530642b18
|
|
@ -26,8 +26,8 @@ echo "loading common yocto build module..."
|
|||
|
||||
def cleanWorkspace() {
|
||||
println "cleaning workspace..."
|
||||
sh "find \"${WORKSPACE}/build-common/sstate-cache/\" -name \"sstate*\" -atime +3 -delete"
|
||||
sh "find \"${env.SHARED_BUILD}/tmp/work/\" -name temp -type d -exec rm -rf {} +"
|
||||
sh "[[ -d \"${WORKSPACE}/build-common/sstate-cache\" ]] && find \"${WORKSPACE}/build-common/sstate-cache/\" -name \"sstate*\" -atime +3 -delete || true"
|
||||
sh "[[ -d \"${env.SHARED_BUILD}/tmp/work\" ]] && find \"${env.SHARED_BUILD}/tmp/work/\" -name temp -type d -exec rm -rf {} + || true"
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue