Merge "Clone the corresponding branch of the repo according to the job branch"
authorJing Lu <lvjing5@huawei.com>
Thu, 1 Dec 2016 01:11:09 +0000 (01:11 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Thu, 1 Dec 2016 01:11:09 +0000 (01:11 +0000)
docker/Dockerfile

index fb8625e..048804d 100644 (file)
@@ -57,8 +57,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