From 38db5e700a8a556fea8052ee94f84ffd39f67d95 Mon Sep 17 00:00:00 2001 From: Anna Babu Palathingal <148897727+annaibm@users.noreply.github.com> Date: Mon, 15 Jul 2024 12:58:02 -0400 Subject: [PATCH] Avoid unnecessary copying of system lib files (#5418) - Ensure system lib files are only copied when isSVTTestRepo is set to true - Prevent unnecessary copying of system lib files to systemtest_prereqs directory related:https://github.ibm.com/runtimes/backlog/issues/1457 Signed-off-by: Anna Babu Palathingal --- buildenv/jenkins/JenkinsfileBase | 3 ++- get.sh | 6 +----- system/common.xml | 11 ++--------- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/buildenv/jenkins/JenkinsfileBase b/buildenv/jenkins/JenkinsfileBase index ac46ea6361..a7dd233357 100644 --- a/buildenv/jenkins/JenkinsfileBase +++ b/buildenv/jenkins/JenkinsfileBase @@ -112,7 +112,6 @@ def setupEnv() { env.LIGHT_WEIGHT_CHECKOUT = (params.LIGHT_WEIGHT_CHECKOUT == false) ? params.LIGHT_WEIGHT_CHECKOUT : true env.GENERATE_JOBS = params.GENERATE_JOBS ?: false - env.isSVTTestRepo=false if (JOB_NAME.contains("Grinder")) { def currentDate = new Date() @@ -511,6 +510,8 @@ def setup() { VENDOR_TEST_BRANCHES = (params.VENDOR_TEST_BRANCHES) ? "--vendor_branches \"${params.VENDOR_TEST_BRANCHES}\"" : "" VENDOR_TEST_DIRS = (params.VENDOR_TEST_DIRS) ? "--vendor_dirs \"${params.VENDOR_TEST_DIRS}\"" : "" VENDOR_TEST_SHAS = (params.VENDOR_TEST_SHAS) ? "--vendor_shas \"${params.VENDOR_TEST_SHAS}\"" : "" + env.IS_SVT_TESTREPO = (params.VENDOR_TEST_REPOS && params.VENDOR_TEST_REPOS.contains('SVTTestRepo')) ? true : false + echo "IS_SVT_TESTREPO is set to ${env.IS_SVT_TESTREPO}" // handle three cases (true/false/null) in params.TEST_IMAGES_REQUIRED and params.DEBUG_IMAGES_REQUIRED // Only set image required to false if params is set to false. In get.sh, the default value is true diff --git a/get.sh b/get.sh index 513582691a..3465927726 100755 --- a/get.sh +++ b/get.sh @@ -637,11 +637,7 @@ getVendorTestMaterial() { continue fi fi - - if [[ "$repoURL" =~ "SVTTestRepo" ]]; then - isSVTTestRepo=true - fi - + echo "git clone ${branchOption} $repoURL $dest" git clone -q --depth 1 $branchOption $repoURL $dest diff --git a/system/common.xml b/system/common.xml index 6b4bc71175..2dc220e63c 100644 --- a/system/common.xml +++ b/system/common.xml @@ -350,16 +350,9 @@ - - - - - - - - + - +