• @songhuang 我还是没有完全找到地方使用 specs.hostnamespecs.network 的地方,我的猜测是 hostname 和 network 都应该只是占位符,真正的值是通过环境变量传参进来的。

    使用 prepend_mod 方式进行扩展,把 staging, production 实例改成我们自己的 url 和 tag。

    所以不太清楚你上面说的,具体是什么意思

  • @chaomao

    1. 使用 specs.hostnamespecs.network 的地方,在 Component::Specs.perform 逻辑里面:
    feature_flag_sets.each do |feature_flag_set|
      @docker.run(image: qa_image, args: [suite, *args_with_flags(args, feature_flag_set)]) do |command|
        command << "-t --rm --net=#{network || 'bridge'}"
    
        unless hostname.nil?
          command << "--hostname #{hostname}"
          command.env('QA_HOSTNAME', hostname)
        end
    
        env.merge(Runtime::Env.variables).each do |key, value|
          command.env(key, value)
        end
    
        command.volume('/var/run/docker.sock', '/var/run/docker.sock')
        command.volume(File.join(Runtime::Env.host_artifacts_dir, name), File.join(Docker::Volumes::QA_CONTAINER_WORKDIR, 'tmp'))
    
        @volumes.to_h.each do |to, from|
          command.volume(to, from)
        end
    
        command.name(name)
      end
    end
    
    1. prepend_mod 那里是我的问题,我漏掉掉了东西。我重新添加一下,你再看看。
    Song Huang 编辑于
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
想要评论请 注册