summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2016-02-22 12:51:02 +0100
committerMorgan Richomme <morgan.richomme@orange.com>2016-02-22 13:19:31 +0000
commit716abc42abd73241c42e432c87c362118b09026a (patch)
tree646e44f033481cbfe354e4ff7dbe87858c566b2d
parent8227267be946b434cb211f8fa9da2052b474a8d9 (diff)
Add git support for Doctor repo in config_functest.yaml
Change-Id: I10ad0dc6cd6697a2a93f5e11edcdd69f70f86c5f Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com> (cherry picked from commit e0e52cec1e43491714f0ce078a7722e2cc3d9fca)
-rwxr-xr-xdocker/common.sh9
-rwxr-xr-xdocker/prepare_env.sh12
-rw-r--r--testcases/config_functest.yaml2
3 files changed, 20 insertions, 3 deletions
diff --git a/docker/common.sh b/docker/common.sh
index 7d973ab26..0d2cfb9b0 100755
--- a/docker/common.sh
+++ b/docker/common.sh
@@ -29,8 +29,6 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
#
-cd $repos_dir/functest
-git pull
mkdir -p /home/opnfv/functest/conf
config_file=/home/opnfv/functest/conf/config_functest.yaml
@@ -54,6 +52,8 @@ BGPVPN_REPO_DIR=$(cat $config_file | grep -w dir_repo_bgpvpn | awk 'END {print $
ONOS_REPO_DIR=$(cat $config_file | grep -w dir_repo_onos | awk 'END {print $NF}')
PROMISE_REPO_DIR=$(cat $config_file | grep -w dir_repo_promise | awk 'END {print $NF}')
OVNO_REPO_DIR=$(cat $config_file | grep -w dir_repo_ovno | awk 'END {print $NF}')
+DOCTOR_REPO_DIR=$(cat $config_file | grep -w dir_repo_doctor | awk 'END {print $NF}')
+
FUNCTEST_DIR=$(cat $config_file | grep -w dir_functest | awk 'END {print $NF}')
FUNCTEST_RESULTS_DIR=$(cat $config_file | grep -w dir_results | awk 'END {print $NF}')
@@ -76,7 +76,8 @@ PROMISE_BRANCH=$(cat $config_file | grep -w promise_branch | awk 'END {print $NF
PROMISE_COMMIT=$(cat $config_file | grep -w promise_commit | awk 'END {print $NF}')
OVNO_BRANCH=$(cat $config_file | grep -w ovno_branch | awk 'END {print $NF}')
OVNO_COMMIT=$(cat $config_file | grep -w ovno_commit | awk 'END {print $NF}')
-
+DOCTOR_BRANCH=$(cat $config_file | grep -w doctor_branch | awk 'END {print $NF}')
+DOCTOR_COMMIT=$(cat $config_file | grep -w doctor_commit | awk 'END {print $NF}')
echo "_____Parsed needed data from ${config_file}:"
echo "####### Directories #######"
@@ -103,6 +104,8 @@ echo "PROMISE_BRANCH=${PROMISE_BRANCH}"
echo "PROMISE_COMMIT=${PROMISE_COMMIT}"
echo "OVNO_BRANCH=${OVNO_BRANCH}"
echo "OVNO_COMMIT=${OVNO_COMMIT}"
+echo "DOCTOR_BRANCH=${DOCTOR_BRANCH}"
+echo "DOCTOR_COMMIT=${DOCTOR_COMMIT}"
echo "############################"
info () {
diff --git a/docker/prepare_env.sh b/docker/prepare_env.sh
index ea82ea1c0..542df0e72 100755
--- a/docker/prepare_env.sh
+++ b/docker/prepare_env.sh
@@ -174,6 +174,18 @@ if [ $offline == false ]; then
git reset --hard ${OVNO_COMMIT}
fi
+ info "Updating DOCTOR repository...."
+ cd ${DOCTOR_REPO_DIR}
+ if [ ${DOCTOR_BRANCH} != "master" ]; then
+ info "DOCTOR repo: checkout ${DOCTOR} branch..."
+ git checkout ${DOCTOR_BRANCH}
+ fi
+ info "DOCTOR repo: pulling to latest..."
+ git pull
+ if [ ${DOCTOR_COMMIT} != "latest" ]; then
+ info "DOCTOR repo: given commit is ${DOCTOR_COMMIT}. Reseting..."
+ git reset --hard ${DOCTOR_COMMIT}
+ fi
fi
# We do this regardless if its online or offline mode.
diff --git a/testcases/config_functest.yaml b/testcases/config_functest.yaml
index 6f2e106ce..5f7daee11 100644
--- a/testcases/config_functest.yaml
+++ b/testcases/config_functest.yaml
@@ -43,6 +43,8 @@ general:
promise_commit: latest
ovno_branch: master
ovno_commit: latest
+ doctor_branch: stable/brahmaputra
+ doctor_commit: latest
openstack:
image_name: functest-img