From da2cfe7feab2eaaa87a40bad38971f88beaf8092 Mon Sep 17 00:00:00 2001 From: pan <601760354@163.com> Date: Thu, 13 Jun 2024 11:44:39 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=82=E9=85=8D=E8=A7=92=E8=89=B2=E5=90=8D?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pipeline_script_generator/jenkins_generator.py | 10 +++++----- .../pipeline_script_generator/script_generator.py | 12 +++++------- .../src/pipeline_script_generator_main.py | 2 -- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/tools/download_and_deploy/src/pipeline_script_generator/jenkins_generator.py b/tools/download_and_deploy/src/pipeline_script_generator/jenkins_generator.py index 355bf05..89c2bcc 100644 --- a/tools/download_and_deploy/src/pipeline_script_generator/jenkins_generator.py +++ b/tools/download_and_deploy/src/pipeline_script_generator/jenkins_generator.py @@ -4,7 +4,7 @@ from pipeline_script_generator.script_generator import ScriptGenerator class JenkinsScript(ScriptGenerator): base_template = """ pipeline { - agent any + agent none options { timeout(time: 1, unit: 'HOURS') } @@ -429,9 +429,9 @@ pipeline { """ build_template = """ // 普通编译 - stage('build') { + stage('gcc-build') { agent { - label 'kunpeng_##BUILDER_LABEL##' + label 'kunpeng_c_builder_gcc' } steps { sh ''' @@ -444,7 +444,7 @@ pipeline { // 使用毕昇编译器编译 stage('bisheng-build') { agent { - label 'kunpeng_##BUILDER_LABEL##' + label 'kunpeng_c_builder_bisheng_compiler' } steps { sh ''' source ${HOME}/.local/wrap-bin/devkit_pipeline.sh @@ -457,7 +457,7 @@ pipeline { // 使用GCC for openEuler编译,使用A-FOT工具时,需要根据用户指南填写配置项 stage('A-FOT') { agent { - label '##BUILDER_LABEL##' + label 'kunpeng_c_builder_gcc' } steps { sh ''' diff --git a/tools/download_and_deploy/src/pipeline_script_generator/script_generator.py b/tools/download_and_deploy/src/pipeline_script_generator/script_generator.py index d03647e..d54f761 100644 --- a/tools/download_and_deploy/src/pipeline_script_generator/script_generator.py +++ b/tools/download_and_deploy/src/pipeline_script_generator/script_generator.py @@ -27,20 +27,18 @@ class ScriptGenerator: self.memory_consistency_template, self.vector_check_template ], - C_BUIDLER: [self.build_template, self.a_fot_template, self.bisheng_compiler_template], - C_BUIDLER_GCC: [self.build_template, self.a_fot_template], - C_BUIDLER_BISHENG_COMPILER: [self.bisheng_compiler_template], - EXECUTOR: [self.compatibility_test_template, self.java_perf_template] + C_BUILDER_GCC: [self.build_template, self.a_fot_template], + C_BUILDER_BISHENG_COMPILER: [self.bisheng_compiler_template], + EXECUTOR: [self.compatibility_test_template, self.java_perf_template], + CLAMAV: [self.clamav_template] } def generate(self): - separator = "#"*120 + "\n" + separator = "/" + "*"*120 + "/\n" conf = separator for role in ROLE_LIST: if role not in self.data: continue - if C_BUIDLER in self.data and (role == C_BUIDLER_GCC or role == C_BUIDLER_BISHENG_COMPILER): - continue for temp in self.ROLE_FUNCTION.get(role, []): conf += temp + separator return self.base_template.replace("##STAGES##", conf) diff --git a/tools/download_and_deploy/src/pipeline_script_generator_main.py b/tools/download_and_deploy/src/pipeline_script_generator_main.py index b23dbeb..dc56a0e 100644 --- a/tools/download_and_deploy/src/pipeline_script_generator_main.py +++ b/tools/download_and_deploy/src/pipeline_script_generator_main.py @@ -4,7 +4,6 @@ from pipeline_script_generator.script_generator_command_line import process_comm from handler.pipeline import PipeLine from handler.base_yaml_check import BaseCheck from handler.generate_pipeline_script import GeneratePipelineScript -from constant import INSTRUCTION from utils import read_yaml_file @@ -17,7 +16,6 @@ if __name__ == '__main__': class_list=[CommandLine]) config_logging(CommandLine.silent) config_dict = read_yaml_file(CommandLine.yaml_path) - config_dict[INSTRUCTION] = "default" pipe = PipeLine(config_dict) pipe.add_tail(*PIPELINE) pipe.start() -- Gitee