Adding BGPVPN repository to the Docker image and scripts
authorjose.lausuch <jose.lausuch@ericsson.com>
Mon, 14 Dec 2015 10:09:54 +0000 (11:09 +0100)
committerjose.lausuch <jose.lausuch@ericsson.com>
Mon, 14 Dec 2015 10:12:30 +0000 (11:12 +0100)
JIRA: FUNCTEST-99

Change-Id: Iaf97241291ba233e1c9597b2274adad81e3ffb01
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
docker/Dockerfile
docker/common.sh
docker/prepare_env.sh
testcases/config_functest.yaml

index 4ae0d30..8c53f81 100644 (file)
@@ -24,6 +24,7 @@ MAINTAINER Jose Lausuch <jose.lausuch@ericsson.com>
 LABEL version="0.1" description="OPNFV Functest Docker container"
 
 ENV repos_dir /home/opnfv/repos
+ENV HOME /home/opnfv
 
 WORKDIR /home/opnfv
 
@@ -60,6 +61,7 @@ RUN git clone https://gerrit.opnfv.org/gerrit/releng ${repos_dir}/releng
 RUN git clone https://github.com/openstack/rally.git ${repos_dir}/rally
 RUN git clone https://github.com/opendaylight/integration.git ${repos_dir}/odl_integration
 RUN git clone -b stable https://github.com/boucherv-orange/clearwater-live-test ${repos_dir}/vims-test
+RUN git clone https://github.com/openstack/networking-bgpvpn ${repos_dir}/bgpvpn
 
 RUN pip install -r ${repos_dir}/functest/docker/requirements.pip
 
index 8c02d48..82a4719 100755 (executable)
@@ -34,6 +34,7 @@ FUNCTEST_REPO_DIR=$(cat $config_file | grep -w dir_repo_functest | awk 'END {pri
 RALLY_REPO_DIR=$(cat $config_file | grep -w dir_repo_rally | awk 'END {print $NF}')
 RELENG_REPO_DIR=$(cat $config_file | grep -w dir_repo_releng | awk 'END {print $NF}')
 VIMS_REPO_DIR=$(cat $config_file | grep -w dir_repo_vims_test | awk 'END {print $NF}')
+BGPVPN_REPO_DIR=$(cat $config_file | grep -w dir_repo_bgpvpn | 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}')
@@ -50,6 +51,9 @@ RELENG_BRANCH=$(cat $config_file | grep -w releng_branch | awk 'END {print $NF}'
 RELENG_COMMIT=$(cat $config_file | grep -w releng_commit | awk 'END {print $NF}')
 VIMS_BRANCH=$(cat $config_file | grep -w vims_test_branch | awk 'END {print $NF}')
 VIMS_COMMIT=$(cat $config_file | grep -w vims_test_commit | awk 'END {print $NF}')
+BGPVPN_BRANCH=$(cat $config_file | grep -w bgpvpn_branch | awk 'END {print $NF}')
+BGPVPN_COMMIT=$(cat $config_file | grep -w bgpvpn_commit | awk 'END {print $NF}')
+
 
 echo "_____Parsed needed data from ${config_file}:"
 echo "####### Directories #######"
index 3353a34..5a39c84 100755 (executable)
@@ -129,6 +129,18 @@ if [ $offline == false ]; then
         git reset --hard ${VIMS_COMMIT}
     fi
 
+    info "Updating BGPVPN repository...."
+    cd ${BGPVPN_REPO_DIR}
+    if [ ${BGPVPN_BRANCH} != "master" ]; then
+        info "BGPVPN repo: checkout ${BGPVPN_BRANCH} branch..."
+        git checkout ${BGPVPN_BRANCH}
+    fi
+    info "BGPVPN repo: pulling to latest..."
+    git pull
+    if [ ${BGPVPN_COMMIT} != "latest" ]; then
+        info "BGPVPN repo: given commit is ${BGPVPN_COMMIT}. Reseting..."
+        git reset --hard ${BGPVPN_COMMIT}
+    fi
 fi
 
 # We do this regardless if its online or offline mode.
index 96436bb..e88d351 100644 (file)
@@ -14,6 +14,7 @@ general:
         dir_repo_rally:     /home/opnfv/repos/rally
         dir_repo_releng:    /home/opnfv/repos/releng
         dir_repo_vims_test: /home/opnfv/repos/vims-test
+        dir_repo_bgpvpn:    /home/opnfv/repos/bgpvpn
         dir_functest:       /home/opnfv/functest
         dir_results:        /home/opnfv/functest/results
         dir_functest_conf:  /home/opnfv/functest/conf
@@ -32,6 +33,8 @@ general:
         rally_commit:   9a17d8490e7fb4afee2f5629e6db41eabe4bc4d4
         vims_test_branch:   stable
         vims_test_commit:   latest
+        bgpvpn_branch:   master
+        bgpvpn_commit:   latest
 
     openstack:
         image_name: functest-img