feature/integrate-jenkins-code-coverage #3

Merged
torsten merged 19 commits from feature/integrate-jenkins-code-coverage into main 2026-10-22 20:59:05 +00:00
Showing only changes of commit a89ac10175 - Show all commits
Vendored
+36 -2
View File
@@ -27,7 +27,24 @@ pipeline {
steps {
script {
echo "Cleaning workspace to avoid corruption issues..."
cleanWs deleteDirs: true, disableDeferredWipeout: true
// Use shell command with chmod to handle permission issues
sh '''
if [ -d "${WORKSPACE}/${BUILD_DIR}" ]; then
echo "Removing build directory with permission fix..."
chmod -R u+w "${WORKSPACE}/${BUILD_DIR}" 2>/dev/null || true
rm -rf "${WORKSPACE}/${BUILD_DIR}"
fi
if [ -d "${WORKSPACE}/${COVERAGE_BUILD_DIR}" ]; then
echo "Removing coverage build directory..."
chmod -R u+w "${WORKSPACE}/${COVERAGE_BUILD_DIR}" 2>/dev/null || true
rm -rf "${WORKSPACE}/${COVERAGE_BUILD_DIR}"
fi
if [ -d "${WORKSPACE}/coverage" ]; then
echo "Removing coverage output directory..."
chmod -R u+w "${WORKSPACE}/coverage" 2>/dev/null || true
rm -rf "${WORKSPACE}/coverage"
fi
'''
}
}
}
@@ -112,7 +129,24 @@ pipeline {
always {
script {
if (getContext(hudson.FilePath)) {
cleanWs deleteDirs: true, disableDeferredWipeout: true
// Use shell command with chmod to handle permission issues
sh '''
if [ -d "${WORKSPACE}/${BUILD_DIR}" ]; then
echo "Final cleanup: Removing build directory..."
chmod -R u+w "${WORKSPACE}/${BUILD_DIR}" 2>/dev/null || true
rm -rf "${WORKSPACE}/${BUILD_DIR}"
fi
if [ -d "${WORKSPACE}/${COVERAGE_BUILD_DIR}" ]; then
echo "Final cleanup: Removing coverage build directory..."
chmod -R u+w "${WORKSPACE}/${COVERAGE_BUILD_DIR}" 2>/dev/null || true
rm -rf "${WORKSPACE}/${COVERAGE_BUILD_DIR}"
fi
if [ -d "${WORKSPACE}/coverage" ]; then
echo "Final cleanup: Removing coverage output..."
chmod -R u+w "${WORKSPACE}/coverage" 2>/dev/null || true
rm -rf "${WORKSPACE}/coverage"
fi
'''
}
}
}