diff --git a/contrib/intel/jenkins/Jenkinsfile b/contrib/intel/jenkins/Jenkinsfile index c8e037350b2..cbd73bb6211 100644 --- a/contrib/intel/jenkins/Jenkinsfile +++ b/contrib/intel/jenkins/Jenkinsfile @@ -315,11 +315,10 @@ pipeline { } environment { JOB_CADENCE = 'PR' - LOG_DIR = "${env.JOB_INSTALL_DIR}/${env.JOB_NAME}/${env.BUILD_NUMBER}/log_dir" WITH_ENV="'PATH+EXTRA=/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/bin:$PYTHONPATH'" - DELETE_LOCATION="${env.JOB_INSTALL_DIR}/${env.JOB_NAME}/${env.BUILD_NUMBER}" RUN_LOCATION="${env.WORKSPACE}/${SCRIPT_LOCATION}/" CUSTOM_WORKSPACE="${CB_HOME}/workspace/${JOB_NAME}/${env.BUILD_NUMBER}" + LOG_DIR = "${env.CUSTOM_WORKSPACE}/log_dir" } stages { stage ('checkout') { @@ -768,7 +767,6 @@ pipeline { } aborted { node ('daos_head') { - dir ("${DELETE_LOCATION}/middlewares") { deleteDir() } } node ('ze') { dir ("${DELETE_LOCATION}/middlewares") { deleteDir() } @@ -777,16 +775,13 @@ pipeline { } cleanup { node ('daos_head') { - dir ("${DELETE_LOCATION}") { deleteDir() } dir("${env.WORKSPACE}") { deleteDir() } dir("${env.WORKSPACE}@tmp") { deleteDir() } } node ('ze') { - dir("${DELETE_LOCATION}") { deleteDir() } dir("${env.WORKSPACE}") { deleteDir() } dir("${env.WORKSPACE}@tmp") { deleteDir() } } - dir("${DELETE_LOCATION}") { deleteDir() } dir("${env.WORKSPACE}") { deleteDir() } dir("${env.WORKSPACE}@tmp") { deleteDir() } } diff --git a/contrib/intel/jenkins/build.py b/contrib/intel/jenkins/build.py index 24de4a64386..054cc01a017 100755 --- a/contrib/intel/jenkins/build.py +++ b/contrib/intel/jenkins/build.py @@ -155,6 +155,7 @@ def log_dir(install_path, release=False): jobname = os.environ['JOB_NAME'] buildno = os.environ['BUILD_NUMBER'] workspace = os.environ['WORKSPACE'] + custom_workspace = os.environ['CUSTOM_WORKSPACE'] parser = argparse.ArgumentParser() parser.add_argument('--build_item', help="build libfabric or fabtests", \ @@ -184,9 +185,7 @@ def log_dir(install_path, release=False): else: ofi_build_mode = 'reg' - install_path = f'{cloudbees_config.install_dir}/{jobname}/{buildno}' - libfab_install_path = f'{cloudbees_config.install_dir}/{jobname}/'\ - f'{buildno}/{build_hw}/{ofi_build_mode}' + libfab_install_path = f'{custom_workspace}/{build_hw}/{ofi_build_mode}' p = re.compile('mpi*') @@ -198,11 +197,11 @@ def log_dir(install_path, release=False): elif (build_item == 'fabtests'): build_fabtests(libfab_install_path, ofi_build_mode) elif (build_item == 'builddir'): - copy_build_dir(install_path) + copy_build_dir(custom_workspace) elif (build_item == 'logdir'): - log_dir(install_path, release) + log_dir(custom_workspace, release) elif(build_item == 'mpich'): - build_mpich(install_path, libfab_install_path, build_hw) - build_mpich_osu(install_path, libfab_install_path, build_hw) + build_mpich(custom_workspace, libfab_install_path, build_hw) + build_mpich_osu(custom_workspace, libfab_install_path, build_hw) os.chdir(curr_dir) diff --git a/contrib/intel/jenkins/summary.py b/contrib/intel/jenkins/summary.py index e91f8abdecc..80701682586 100755 --- a/contrib/intel/jenkins/summary.py +++ b/contrib/intel/jenkins/summary.py @@ -12,7 +12,7 @@ from email import encoders # add jenkins config location to PATH -sys.path.append(f"{os.environ['WORKSPACE']}/ci_resources/configs/{os.environ['CLUSTER']}") +sys.path.append(f"{os.environ['CUSTOM_WORKSPACE']}/ci_resources/configs/{os.environ['CLUSTER']}") import cloudbees_config import argparse @@ -769,7 +769,8 @@ def read_file(self): self.check_line(line) def get_release_num(): - file_name = f'{os.environ["WORKSPACE"]}/source/release_num.txt' + file_name = f'{os.environ["CUSTOM_WORKSPACE"]}/source/libfabric/'\ + 'release_num.txt' if os.path.exists(file_name): with open(file_name) as f: num = f.readline() @@ -921,6 +922,7 @@ def summarize_items(summary_item, logger, log_dir, mode): jobname = os.environ['JOB_NAME'] buildno = os.environ['BUILD_NUMBER'] workspace = os.environ['WORKSPACE'] + custom_workspace = os.environ['CUSTOM_WORKSPACE'] parser = argparse.ArgumentParser() parser.add_argument('--summary_item', help="functional test to summarize", @@ -945,7 +947,7 @@ def summarize_items(summary_item, logger, log_dir, mode): send_mail = args.send_mail mpi_list = ['impi', 'mpich', 'ompi'] - log_dir = f'{cloudbees_config.install_dir}/{jobname}/{buildno}/log_dir' + log_dir = f'{custom_workspace}/log_dir' if (not os.path.exists(log_dir)): os.makedirs(log_dir) @@ -981,7 +983,7 @@ def summarize_items(summary_item, logger, log_dir, mode): err += summarize_items(summary_item, logger, log_dir, mode) if (release): - shutil.copyfile(f'{full_file_name}', f'{workspace}/{output_name}') + shutil.copyfile(f'{full_file_name}', f'{custom_workspace}/{output_name}') if (send_mail): SendEmail(sender = os.environ['SENDER'], diff --git a/contrib/intel/jenkins/tests.py b/contrib/intel/jenkins/tests.py index 54cc32668ba..74af17a0a90 100755 --- a/contrib/intel/jenkins/tests.py +++ b/contrib/intel/jenkins/tests.py @@ -37,16 +37,12 @@ def __init__ (self, jobname, buildno, testname, hw, core_prov, fabric, self.client = hosts[1] self.nw_interface = cloudbees_config.interface_map[self.fabric] - self.libfab_installpath = f'{cloudbees_config.install_dir}/'\ - f'{self.jobname}/{self.buildno}/{self.hw}/'\ - f'{self.ofi_build_mode}' - - self.middlewares_path = f'{cloudbees_config.install_dir}/'\ - f'{self.jobname}/{self.buildno}/'\ - 'middlewares' - self.ci_logdir_path = f'{cloudbees_config.install_dir}/'\ - f'{self.jobname}/{self.buildno}/'\ - 'log_dir' + self.custom_workspace = os.environ['CUSTOM_WORKSPACE'] + self.libfab_installpath = f'{self.custom_workspace}/'\ + f'{self.hw}/{self.ofi_build_mode}' + + self.middlewares_path = f'{self.custom_workspace}/middlewares' + self.ci_logdir_path = f'{self.custom_workspace}/log_dir' self.env = user_env self.way = way