From ba4c62d29b865fb33372d84d040689e03c72daba Mon Sep 17 00:00:00 2001 From: Yongjoo Ahn Date: Tue, 5 Sep 2023 21:11:51 +0900 Subject: [PATCH] [gbs] Let tizen gbs build use cache properly - Currently only the first arch option use the gbs build cache. - Remove GBS-ROOT folder when all the tizen gbs build is finished. Signed-off-by: Yongjoo Ahn --- ci/taos/checker-pr-postbuild-async.sh | 8 ++++++++ ci/taos/plugins-base/pr-postbuild-build-tizen.sh | 8 ++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ci/taos/checker-pr-postbuild-async.sh b/ci/taos/checker-pr-postbuild-async.sh index 9374ec5..1664aac 100755 --- a/ci/taos/checker-pr-postbuild-async.sh +++ b/ci/taos/checker-pr-postbuild-async.sh @@ -336,5 +336,13 @@ fi # Please append a command below. echo -e "[DEBUG] The current directory: $(pwd)." +echo -e "[DEBUG] Remove the GBS-ROOT folder." +sudo rm -rf ./GBS-ROOT/ +if [[ $? -eq 0 ]]; then + echo -e "[DEBUG] Successfully removed the GBS-ROOT folder." +else + echo -e "[WARN] Failed to remove the GBS-ROOT folder." +fi + # Return with exit code exit $exit_code diff --git a/ci/taos/plugins-base/pr-postbuild-build-tizen.sh b/ci/taos/plugins-base/pr-postbuild-build-tizen.sh index 9823f10..892389a 100644 --- a/ci/taos/plugins-base/pr-postbuild-build-tizen.sh +++ b/ci/taos/plugins-base/pr-postbuild-build-tizen.sh @@ -172,12 +172,12 @@ function pr-postbuild-build-tizen-run-queue(){ echo "Archiving .rpm files for $1 ..." ls -al ./GBS-ROOT/local/repos/tizen/$1/RPMS/ sudo cp -arf ./GBS-ROOT/local/repos/tizen/$1/RPMS ../$PACK_BIN_FOLDER || echo -e "[DEBUG] Can't copy .rpm files." - echo "Removing ./GBS-ROOT/ folder..." - sudo rm -rf ./GBS-ROOT/ + echo "Removing ./GBS-ROOT/local/BUILD-ROOTS/ folder..." + sudo rm -rf ./GBS-ROOT/local/BUILD-ROOTS/ if [[ $? -ne 0 ]]; then - echo "[DEBUG][FAILED] Tizen/gbs: Oooops!!!!! ./GBS-ROOT folder is not removed." + echo "[DEBUG][FAILED] Tizen/gbs: Oooops!!!!! ./GBS-ROOT/local/BUILD-ROOTS/ folder is not removed." else - echo "[DEBUG][PASSED] Tizen/gbs: It is okay. ./GBS-ROOT folder is successfully removed." + echo "[DEBUG][PASSED] Tizen/gbs: It is okay. ./GBS-ROOT/local/BUILD-ROOTS/ folder is successfully removed." fi fi echo "[DEBUG] The current directory: $(pwd)"