From 8ebad39c25d90dad42a7f77023fb2b0c979a3e11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Wed, 8 Feb 2023 18:01:24 +0100 Subject: [PATCH] ci: add cleanup step to all e2e Jenkins jobs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Otherwise we get multiple APKs in the `results` folder. ``` admin@linux-01.he-eu-hel1.ci.devel:/home/jenkins/workspace/status-mobile/e2e/status-app-prs % ls -l result total 502236 -rw-r--r-- 1 jenkins jenkins 57334087 Feb 7 10:25 StatusIm-Mobile-230207-101618-991339-pr14988-x86.apk -rw-r--r-- 1 jenkins jenkins 57080127 Feb 7 13:18 StatusIm-Mobile-230207-131114-098c05-pr14977-x86.apk -rw-r--r-- 1 jenkins jenkins 57088322 Feb 7 14:19 StatusIm-Mobile-230207-141155-05cc4c-pr15002-x86.apk ... ``` And `utils.findFile()` just pick the first one alphabeticlly. Signed-off-by: Jakub SokoĊ‚owski --- ci/tests/Jenkinsfile.e2e-nightly | 3 +++ ci/tests/Jenkinsfile.e2e-prs | 5 +++++ ci/tests/Jenkinsfile.e2e-upgrade | 3 +++ 3 files changed, 11 insertions(+) diff --git a/ci/tests/Jenkinsfile.e2e-nightly b/ci/tests/Jenkinsfile.e2e-nightly index b498e14e46..43d014378b 100644 --- a/ci/tests/Jenkinsfile.e2e-nightly +++ b/ci/tests/Jenkinsfile.e2e-nightly @@ -97,5 +97,8 @@ pipeline { ) } } + cleanup { + sh 'make purge' + } } } diff --git a/ci/tests/Jenkinsfile.e2e-prs b/ci/tests/Jenkinsfile.e2e-prs index 258babec5a..f612b446ee 100644 --- a/ci/tests/Jenkinsfile.e2e-prs +++ b/ci/tests/Jenkinsfile.e2e-prs @@ -129,4 +129,9 @@ pipeline { } } } } + post { + cleanup { + sh 'make purge' + } + } } diff --git a/ci/tests/Jenkinsfile.e2e-upgrade b/ci/tests/Jenkinsfile.e2e-upgrade index 5a81707b6c..740676b906 100644 --- a/ci/tests/Jenkinsfile.e2e-upgrade +++ b/ci/tests/Jenkinsfile.e2e-upgrade @@ -115,5 +115,8 @@ pipeline { ) } } + cleanup { + sh 'make purge' + } } }