Signed-off-by: Cao Xueliang caoxl78320@163.com --- lib/constants.rb | 22 +++++++++++----------- src/delimiter/constants.rb | 16 ++++++++-------- 2 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/lib/constants.rb b/lib/constants.rb index 27f37cb..5ed4d57 100644 --- a/lib/constants.rb +++ b/lib/constants.rb @@ -5,19 +5,19 @@ require_relative '../container/defconfig.rb'
config = cci_defaults -ES_HOST = config['ES_HOST'] || '172.17.0.1' -ES_PORT = config['ES_PORT'] || 9200 +ES_HOST ||= config['ES_HOST'] || '172.17.0.1' +ES_PORT ||= config['ES_PORT'] || 9200
-SEND_MAIL_HOST = config['SEND_MAIL_HOST'] || '172.17.0.1' -SEND_MAIL_PORT = config['SEND_MAIL_PORT'] || 49000 +SEND_MAIL_HOST ||= config['SEND_MAIL_HOST'] || '172.17.0.1' +SEND_MAIL_PORT ||= config['SEND_MAIL_PORT'] || 49000
-SRV_HTTP_HOST = config['SRV_HTTP_HOST'] || ENV['SRV_HTTP_HOST'] || '172.17.0.1' -SRV_HTTP_PORT = config['SRV_HTTP_PORT'] || ENV['SRV_HTTP_PORT'] || 11300 +SRV_HTTP_HOST ||= config['SRV_HTTP_HOST'] || ENV['SRV_HTTP_HOST'] || '172.17.0.1' +SRV_HTTP_PORT ||= config['SRV_HTTP_PORT'] || ENV['SRV_HTTP_PORT'] || 11300
-SRV_HTTP_DOMAIN = config['SRV_HTTP_DOMAIN'] || ENV['SRV_HTTP_DOMAIN'] || 'api.compass-ci.openeuler.org' +SRV_HTTP_DOMAIN ||= config['SRV_HTTP_DOMAIN'] || ENV['SRV_HTTP_DOMAIN'] || 'api.compass-ci.openeuler.org'
-ASSIST_RESULT_HOST = config['ASSIST_RESULT_HOST'] || ENV['ASSIST_RESULT_HOST'] || '172.17.0.1' -ASSIST_RESULT_PORT = config['ASSIST_RESULT_PORT'] || ENV['ASSIST_RESULT_PORT'] || 8102 +ASSIST_RESULT_HOST ||= config['ASSIST_RESULT_HOST'] || ENV['ASSIST_RESULT_HOST'] || '172.17.0.1' +ASSIST_RESULT_PORT ||= config['ASSIST_RESULT_PORT'] || ENV['ASSIST_RESULT_PORT'] || 8102
-SCHED_HOST = config['SCHED_HOST'] || '172.17.0.1' -SCHED_PORT = config['SCHED_PORT'] || 3000 +SCHED_HOST ||= config['SCHED_HOST'] || '172.17.0.1' +SCHED_PORT ||= config['SCHED_PORT'] || 3000 diff --git a/src/delimiter/constants.rb b/src/delimiter/constants.rb index 95d1acd..a790736 100644 --- a/src/delimiter/constants.rb +++ b/src/delimiter/constants.rb @@ -2,14 +2,14 @@ # Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved. # frozen_string_literal: true
-LKP_SRC = ENV['LKP_SRC'] || '/c/lkp-tests' -GIT_MIRROR_HOST = ENV['GIT_MIRROR_HOST'] || '172.17.0.1' -MONITOR_HOST = ENV['MONITOR_HOST'] || '172.17.0.1' -MONITOR_PORT = ENV['MONITOR_PORT'] || '11310' -DELIMITER_EMAIL = ENV['DELIMITER_EMAIL'] || 'delimiter@localhost' -TMEP_GIT_BASE = '/c/public_git' -DELIMITER_TASK_QUEUE = 'delimiter' +LKP_SRC ||= ENV['LKP_SRC'] || '/c/lkp-tests' +MONITOR_HOST ||= ENV['MONITOR_HOST'] || '172.17.0.1' +MONITOR_PORT ||= ENV['MONITOR_PORT'] || '11310' +GIT_MIRROR_HOST ||= ENV['GIT_MIRROR_HOST'] || '172.17.0.1' +DELIMITER_EMAIL ||= ENV['DELIMITER_EMAIL'] || 'delimiter@localhost' BISECT_RUN_SCRIPT = "#{ENV['CCI_SRC']}/src/delimiter/find-commit/bisect_run_script.rb" # The files which are in this dir can be uploaded by lkp-tests -TMP_RESULT_ROOT = ENV['TMP_RESULT_ROOT'] || '/tmp/lkp/result' +TMP_RESULT_ROOT ||= ENV['TMP_RESULT_ROOT'] || '/tmp/lkp/result' +TMEP_GIT_BASE = '/c/public_git' PROCESS_JOB_YAML = "/tmp/process.yaml" +DELIMITER_TASK_QUEUE = 'delimiter'