From c72f491324909173c83e69c5a86ace7aeb87daaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Wed, 23 Oct 2024 14:16:46 +0200 Subject: [PATCH] fix(ci)_: remove workspace and tmp dir MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This ensures we do not encounter weird errors like: ``` + ln -s /home/jenkins/workspace/go_prs_linux_x86_64_main_PR-5907 /home/jenkins/workspace/go_prs_linux_x86_64_main_PR-5907@tmp/go/src/github.com/status-im/status-go ln: failed to create symbolic link '/home/jenkins/workspace/go_prs_linux_x86_64_main_PR-5907@tmp/go/src/github.com/status-im/status-go': File exists script returned exit code 1 ``` Signed-off-by: Jakub SokoĊ‚owski --- _assets/ci/Jenkinsfile.android | 5 ++++- _assets/ci/Jenkinsfile.ios | 5 ++++- _assets/ci/Jenkinsfile.linux | 5 ++++- _assets/ci/Jenkinsfile.tests | 6 +++--- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/_assets/ci/Jenkinsfile.android b/_assets/ci/Jenkinsfile.android index ef13cfaff..ed80f3822 100644 --- a/_assets/ci/Jenkinsfile.android +++ b/_assets/ci/Jenkinsfile.android @@ -85,6 +85,9 @@ pipeline { post { success { script { github.notifyPR(true) } } failure { script { github.notifyPR(false) } } - cleanup { sh 'make deep-clean' } + cleanup { + cleanWs() + dir("${env.WORKSPACE}@tmp") { deleteDir() } + } } // post } // pipeline diff --git a/_assets/ci/Jenkinsfile.ios b/_assets/ci/Jenkinsfile.ios index 935b4e122..90dbc3d48 100644 --- a/_assets/ci/Jenkinsfile.ios +++ b/_assets/ci/Jenkinsfile.ios @@ -89,6 +89,9 @@ pipeline { post { success { script { github.notifyPR(true) } } failure { script { github.notifyPR(false) } } - cleanup { sh 'make deep-clean' } + cleanup { + cleanWs() + dir("${env.WORKSPACE}@tmp") { deleteDir() } + } } // post } // pipeline diff --git a/_assets/ci/Jenkinsfile.linux b/_assets/ci/Jenkinsfile.linux index 1e76096b8..869b26b28 100644 --- a/_assets/ci/Jenkinsfile.linux +++ b/_assets/ci/Jenkinsfile.linux @@ -92,6 +92,9 @@ pipeline { post { success { script { github.notifyPR(true) } } failure { script { github.notifyPR(false) } } - cleanup { sh 'make deep-clean' } + cleanup { + cleanWs() + dir("${env.WORKSPACE}@tmp") { deleteDir() } + } } // post } // pipeline diff --git a/_assets/ci/Jenkinsfile.tests b/_assets/ci/Jenkinsfile.tests index 627f4e71c..499df4b08 100644 --- a/_assets/ci/Jenkinsfile.tests +++ b/_assets/ci/Jenkinsfile.tests @@ -238,8 +238,8 @@ pipeline { } } cleanup { - dir(env.TMPDIR) { deleteDir() } - sh "make git-clean" + cleanWs() + dir("${env.WORKSPACE}@tmp") { deleteDir() } } } // post } // pipeline @@ -254,4 +254,4 @@ def getDefaultUnitTestCount() { isNightlyJob() ? '20' : '1' } def getDefaultTimeout() { isNightlyJob() ? 5*60 : 50 } -def getAmountToKeep() { isNightlyJob() ? '14' : isDevelopJob() ? '10' : '5' } \ No newline at end of file +def getAmountToKeep() { isNightlyJob() ? '14' : isDevelopJob() ? '10' : '5' }