diff --git a/Jenkinsfile b/Jenkinsfile index 565b302..a3e4760 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -102,7 +102,8 @@ spec: sh ''' set -euo pipefail - SRC_DIR=$(find harbor-src -maxdepth 1 -type d -name "harbor-*" | head -n1) + # `harbor-src/` itself matches `harbor-*`, so exclude it. + SRC_DIR=$(find harbor-src -mindepth 1 -maxdepth 1 -type d -name "harbor-*" | head -n1) cd "${SRC_DIR}" export VERSIONTAG="${VERSIONTAG}" @@ -139,7 +140,7 @@ spec: } post { always { - cleanWs() + deleteDir() } } }