Skip to content

Commit

Permalink
Merge pull request grpc#3859 from stanley-cheung/interop_cleanup_buil…
Browse files Browse the repository at this point in the history
…d_env_var

Revert global_env usage for build_interop_image job
  • Loading branch information
jtattermusch committed Oct 16, 2015
2 parents 5e75116 + f565dfb commit 3573e96
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions tools/run_tests/run_interop_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,7 @@ def cloud_to_prod_env(self):
return _SSL_CERT_ENV

def global_env(self):
# need to manually copy to each jenkins machine if we run into github
# rate limit when running `composer install`
return {"BUILD_INTEROP_DOCKER_EXTRA_ARGS":
"-v /var/local/.composer/auth.json:/root/.composer/auth.json:ro"}
return {}

def __str__(self):
return 'php'
Expand Down Expand Up @@ -475,16 +472,21 @@ def server_jobspec(language, docker_image):

def build_interop_image_jobspec(language, tag=None):
"""Creates jobspec for building interop docker image for a language"""
environ = language.global_env()
if not tag:
tag = 'grpc_interop_%s:%s' % (language.safename, uuid.uuid4())
environ['INTEROP_IMAGE'] = tag
environ['BASE_NAME'] = 'grpc_interop_%s' % language.safename
env = {'INTEROP_IMAGE': tag,
'BASE_NAME': 'grpc_interop_%s' % language.safename}
if not args.travis:
environ['TTY_FLAG'] = '-t'
env['TTY_FLAG'] = '-t'
# This env variable is used to get around the github rate limit
# error when running the PHP `composer install` command
# TODO(stanleycheung): find a more elegant way to do this
if language.safename == 'php' and os.path.exists('/var/local/.composer/auth.json'):
env['BUILD_INTEROP_DOCKER_EXTRA_ARGS'] = \
"-v /var/local/.composer/auth.json:/root/.composer/auth.json:ro"
build_job = jobset.JobSpec(
cmdline=['tools/jenkins/build_interop_image.sh'],
environ=environ,
environ=env,
shortname="build_docker_%s" % (language),
timeout_seconds=30*60)
build_job.tag = tag
Expand Down

0 comments on commit 3573e96

Please sign in to comment.