Skip to content

Commit 5da8c0f

Browse files
authored
sanitize the koji download dir first before polling
1 parent 61ac948 commit 5da8c0f

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

testHeadlessComponents.jenkinsfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,19 @@ timestamps {
159159
echo "KOJI_MAX_PREV_BUILDS: ${params.KOJI_MAX_PREV_BUILDS}"
160160
echo "==============================="
161161

162+
// Clean the download directory before checkout
163+
sh """
164+
echo "=== Cleaning Download Directory ==="
165+
if [ -d "${params.KOJI_DOWNLOAD_DIR}" ]; then
166+
echo "Removing existing directory: ${params.KOJI_DOWNLOAD_DIR}"
167+
rm -rf ${params.KOJI_DOWNLOAD_DIR}
168+
echo "Directory cleaned"
169+
else
170+
echo "Directory ${params.KOJI_DOWNLOAD_DIR} does not exist, nothing to clean"
171+
fi
172+
echo "===================================="
173+
"""
174+
162175
// Download latest Koji build
163176
checkout([$class: 'KojiSCM',
164177
kojiBuildProviders: [[

0 commit comments

Comments
 (0)