Skip to content
Snippets Groups Projects
Commit f0defb09 authored by Jan Tattermusch's avatar Jan Tattermusch
Browse files

Merge pull request #5102 from jtattermusch/docker_git_clone

No git clone for distrib tests
parents 41208893 b5f7397b
No related branches found
No related tags found
No related merge requests found
...@@ -29,6 +29,4 @@ ...@@ -29,6 +29,4 @@
FROM opensuse:42.1 FROM opensuse:42.1
RUN zypper --non-interactive install git
RUN zypper --non-interactive install ruby RUN zypper --non-interactive install ruby
...@@ -29,7 +29,4 @@ ...@@ -29,7 +29,4 @@
FROM ubuntu:12.04 FROM ubuntu:12.04
RUN apt-get update -y RUN apt-get update -y && apt-get install -y ruby-full
RUN apt-get install -y git
RUN apt-get install -y ruby-full
...@@ -29,7 +29,4 @@ ...@@ -29,7 +29,4 @@
FROM ubuntu:14.04 FROM ubuntu:14.04
RUN apt-get update -y RUN apt-get update -y && apt-get install -y ruby-full
RUN apt-get install -y git
RUN apt-get install -y ruby-full
...@@ -29,7 +29,4 @@ ...@@ -29,7 +29,4 @@
FROM ubuntu:15.04 FROM ubuntu:15.04
RUN apt-get update -y RUN apt-get update -y && apt-get install -y ruby-full
RUN apt-get install -y git
RUN apt-get install -y ruby-full
...@@ -29,7 +29,4 @@ ...@@ -29,7 +29,4 @@
FROM ubuntu:15.10 FROM ubuntu:15.10
RUN apt-get update -y RUN apt-get update -y && apt-get install -y ruby-full
RUN apt-get install -y git
RUN apt-get install -y ruby-full
...@@ -29,7 +29,4 @@ ...@@ -29,7 +29,4 @@
FROM ubuntu:16.04 FROM ubuntu:16.04
RUN apt-get update -y RUN apt-get update -y && apt-get install -y ruby-full
RUN apt-get install -y git
RUN apt-get install -y ruby-full
...@@ -29,7 +29,4 @@ ...@@ -29,7 +29,4 @@
FROM debian:wheezy FROM debian:wheezy
RUN apt-get update RUN apt-get update && apt-get install -y ruby-full
RUN apt-get install -y git
RUN apt-get install -y ruby-full
...@@ -37,9 +37,6 @@ cd $(dirname $0)/../.. ...@@ -37,9 +37,6 @@ cd $(dirname $0)/../..
git_root=$(pwd) git_root=$(pwd)
cd - cd -
# Create a local branch so the child Docker script won't complain
git branch -f jenkins-docker
# Inputs # Inputs
# DOCKERFILE_DIR - Directory in which Dockerfile file is located. # DOCKERFILE_DIR - Directory in which Dockerfile file is located.
# DOCKER_RUN_SCRIPT - Script to run under docker (relative to grpc repo root) # DOCKER_RUN_SCRIPT - Script to run under docker (relative to grpc repo root)
......
...@@ -31,18 +31,24 @@ ...@@ -31,18 +31,24 @@
# This script is invoked by build_docker_* inside a docker # This script is invoked by build_docker_* inside a docker
# container. You should never need to call this script on your own. # container. You should never need to call this script on your own.
set -e set -ex
if [ "$RELATIVE_COPY_PATH" == "" ]
then
mkdir -p /var/local/git mkdir -p /var/local/git
git clone --recursive "$EXTERNAL_GIT_ROOT" /var/local/git/grpc git clone --recursive "$EXTERNAL_GIT_ROOT" /var/local/git/grpc
else
mkdir -p "/var/local/git/grpc/$RELATIVE_COPY_PATH"
cp -r "$EXTERNAL_GIT_ROOT/$RELATIVE_COPY_PATH"/* "/var/local/git/grpc/$RELATIVE_COPY_PATH"
fi
if [ -x "$(command -v rvm)" ] if [ -x "$(command -v rvm)" ]
then then
rvm use ruby-2.1 rvm use ruby-2.1
fi fi
cd /var/local/git/grpc
nvm use 4 || true nvm use 4 || true
cd /var/local/git/grpc
$RUN_COMMAND $RUN_COMMAND
...@@ -38,6 +38,7 @@ def create_docker_jobspec(name, dockerfile_dir, shell_command, environ={}, ...@@ -38,6 +38,7 @@ 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():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment