From 89b10106cedc704cb290c622cf7de1235b514033 Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Mon, 13 Jul 2020 14:23:36 -0700 Subject: [PATCH] Update by review --- tools/distrib/rake_compiler_docker_image.rb | 23 +-------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/tools/distrib/rake_compiler_docker_image.rb b/tools/distrib/rake_compiler_docker_image.rb index c228511f3ef..db33d4b6270 100755 --- a/tools/distrib/rake_compiler_docker_image.rb +++ b/tools/distrib/rake_compiler_docker_image.rb @@ -24,35 +24,14 @@ def docker_image_for_rake_compiler(platform) dockerpath = File.dirname(dockerfile) version = Digest::SHA1.file(dockerfile).hexdigest image_name = 'rake_' + platform + '_' + version - # if "DOCKERHUB_ORGANIZATION" env is set, we try to pull the pre-built - # rake-compiler-dock image from dockerhub rather then building from scratch. - if ENV.has_key?('DOCKERHUB_ORGANIZATION') - image_name = ENV['DOCKERHUB_ORGANIZATION'] + '/' + image_name - cmd = "docker pull #{image_name}" - puts cmd - system cmd - raise "Failed to pull the docker image." unless $? == 0 - else - cmd = "docker build -t #{image_name} --file #{dockerfile} #{dockerpath}" - puts cmd - system cmd - raise "Failed to build the docker image." unless $? == 0 - end - image_name + ENV.fetch('DOCKERHUB_ORGANIZATION', 'grpctesting') + '/' + image_name end def run_rake_compiler(platform, args) require 'rake_compiler_dock' - args = 'bash -l' if args.empty? - ENV['RCD_RUBYVM'] = 'mri' ENV['RCD_PLATFORM'] = platform ENV['RCD_IMAGE'] = docker_image_for_rake_compiler(platform) - RakeCompilerDock.sh args end - -if __FILE__ == $0 - docker_for_windows 'x86_64-linux', $*.join(' ') -end