background: extract-stats service use mail-job tool that need get SRV_HTTP_HOST/PORT from ENV for display job result url in email
Signed-off-by: Lu Weitao luweitaobe@163.com --- container/extract-stats/start | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/container/extract-stats/start b/container/extract-stats/start index 6bb9f10..e5ee777 100755 --- a/container/extract-stats/start +++ b/container/extract-stats/start @@ -4,6 +4,7 @@ # frozen_string_literal: true
require 'set' +require 'open3' require_relative '../defconfig.rb'
names = Set.new %w[ @@ -25,6 +26,8 @@ DEFAULT_LKP = '/c/lkp-tests' DEFAULT_CCI = '/c/compass-ci' FLUENTD_HOST = defaults['FLUENTD_HOST'] || '172.17.0.1' FLUENTD_PORT = defaults['FLUENTD_PORT'] || '24224' +SRV_HTTP_HOST = defaults['SRV_HTTP_HOST'] || Open3.capture3('curl ip.sb')[0].chomp +SRV_HTTP_PORT = defaults['SRV_HTTP_PORT'] || '11300' docker_rm "extract-stats"
cmd = %w[ @@ -35,6 +38,8 @@ cmd = %w[ ] + env + %W[ -e LKP_SRC=#{DEFAULT_LKP} -e CCI_SRC=#{DEFAULT_CCI} + -e SRV_HTTP_HOST=#{SRV_HTTP_HOST} + -e SRV_HTTP_PORT=#{SRV_HTTP_PORT} -v #{ENV['LKP_SRC']}:#{DEFAULT_LKP} -v /etc/localtime:/etc/localtime:ro -v #{ENV['CCI_SRC']}:#{DEFAULT_CCI}