diff options
author | jose.lausuch <jose.lausuch@ericsson.com> | 2016-11-30 15:42:53 +0100 |
---|---|---|
committer | Jing Lu <lvjing5@huawei.com> | 2016-12-01 01:23:07 +0000 |
commit | 18a0000d1490177282da98c5e36a566738310c95 (patch) | |
tree | cf098f41fec75010d0e342e0e28edd1e4fb3eeaa /docker | |
parent | bbd5f14bed6844250b80a7def70ced40cdf8a884 (diff) |
Clone the corresponding branch of the repo according to the job branch
Make use of the ARG BRANCH given at build time
cmd="docker build --no-cache -t $DOCKER_REPO_NAME:$DOCKER_TAG
--build-arg BRANCH=$branch ."
Change-Id: I44d342bfa5499ebd119e9147695ea82853eb64b6
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
(cherry picked from commit a8b879387ea8ff072baa6aaf037c6921e354e736)
Diffstat (limited to 'docker')
-rw-r--r-- | docker/Dockerfile | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile index 5387babff..a10b8552f 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -52,8 +52,8 @@ RUN apt-get -y autoremove && \ RUN mkdir -p ${REPOS_DIR} RUN git config --global http.sslVerify false -RUN git clone https://gerrit.opnfv.org/gerrit/yardstick ${YARDSTICK_REPO_DIR} -RUN git clone https://gerrit.opnfv.org/gerrit/releng ${RELENG_REPO_DIR} +RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/yardstick ${YARDSTICK_REPO_DIR} +RUN git clone --depth 1 https://gerrit.opnfv.org/gerrit/releng ${RELENG_REPO_DIR} # install yardstick + dependencies RUN cd ${YARDSTICK_REPO_DIR} && easy_install -U pip |