|
|
@ -38,13 +38,13 @@ def create_docker_jobspec(name, dockerfile_dir, shell_command, environ={}, |
|
|
|
"""Creates jobspec for a task running under docker.""" |
|
|
|
"""Creates jobspec for a task running under docker.""" |
|
|
|
environ = environ.copy() |
|
|
|
environ = environ.copy() |
|
|
|
environ['RUN_COMMAND'] = shell_command |
|
|
|
environ['RUN_COMMAND'] = shell_command |
|
|
|
|
|
|
|
environ['RELATIVE_COPY_PATH'] = 'test/distrib' |
|
|
|
|
|
|
|
|
|
|
|
docker_args=[] |
|
|
|
docker_args=[] |
|
|
|
for k,v in environ.iteritems(): |
|
|
|
for k,v in environ.iteritems(): |
|
|
|
docker_args += ['-e', '%s=%s' % (k, v)] |
|
|
|
docker_args += ['-e', '%s=%s' % (k, v)] |
|
|
|
docker_env = {'DOCKERFILE_DIR': dockerfile_dir, |
|
|
|
docker_env = {'DOCKERFILE_DIR': dockerfile_dir, |
|
|
|
'DOCKER_RUN_SCRIPT': 'tools/jenkins/docker_run.sh', |
|
|
|
'DOCKER_RUN_SCRIPT': 'tools/jenkins/docker_run.sh'} |
|
|
|
'RELATIVE_COPY_PATH': 'test/distrib'} |
|
|
|
|
|
|
|
jobspec = jobset.JobSpec( |
|
|
|
jobspec = jobset.JobSpec( |
|
|
|
cmdline=['tools/jenkins/build_and_run_docker.sh'] + docker_args, |
|
|
|
cmdline=['tools/jenkins/build_and_run_docker.sh'] + docker_args, |
|
|
|
environ=docker_env, |
|
|
|
environ=docker_env, |
|
|
|