[PATCH compass-ci] container: change the style to get the hosts informations

[Why] We can prepare host information in advance. Signed-off-by: Bai Jing <799286817@qq.com> --- container/conserver/generate_conserver.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/container/conserver/generate_conserver.rb b/container/conserver/generate_conserver.rb index 285c393..3d136f0 100755 --- a/container/conserver/generate_conserver.rb +++ b/container/conserver/generate_conserver.rb @@ -5,15 +5,15 @@ require 'fileutils' require 'yaml' -lab = ENV['lab'] -system 'git clone file:///$CCI_REPOS/lab-$lab.git' +lab = ENV['LAB'] || 'z9' +CCI_REPOS = ENV['CCI_REPOS'] || '/c' def generate_conserver(lab) return unless File.exist?('conserver-head.cf') FileUtils.cp('conserver-head.cf', 'conserver.cf') - host_dir = "lab-#{lab}/hosts/" + host_dir = "#{CCI_REPOS}/lab-#{lab}/hosts/" return unless Dir.exist?(host_dir) Dir.each_child(host_dir) do |host| -- 2.23.0
participants (1)
-
Bai Jing