aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2016-03-09 14:08:38 +0100
committerjose.lausuch <jose.lausuch@ericsson.com>2016-03-10 10:37:42 +0100
commitbe52504f137b392bcf9ea1dbc13240350ea2f39a (patch)
treee91a21e00bc233feef829d57cb103394fa040bb1
parent3b70767b85152cc79381104ba73c0afe9607f781 (diff)
Have vIMS and Promise packages pre installed in the docker image.
Also, change to master in Functest repo. JIRA: FUNCTEST-148 Change-Id: Ie4f3991adde9296fe86d4bedd4a9ca5e8aea33b3 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
-rw-r--r--docker/Dockerfile22
-rwxr-xr-xtestcases/config_functest.py39
2 files changed, 20 insertions, 41 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 3a39c4c5c..71032a45a 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -64,7 +64,7 @@ RUN mkdir -p /root/.ssh
RUN chmod 700 /root/.ssh
RUN git config --global http.sslVerify false
-RUN git clone -b stable/brahmaputra https://gerrit.opnfv.org/gerrit/functest ${repos_dir}/functest
+RUN git clone https://gerrit.opnfv.org/gerrit/functest ${repos_dir}/functest
RUN git clone https://gerrit.opnfv.org/gerrit/releng ${repos_dir}/releng
RUN git clone https://gerrit.opnfv.org/gerrit/doctor ${repos_dir}/doctor
RUN git clone https://github.com/openstack/rally.git ${repos_dir}/rally
@@ -78,7 +78,7 @@ RUN git clone https://gerrit.opnfv.org/gerrit/ovno ${repos_dir}/ovno
RUN pip install -r ${repos_dir}/functest/docker/requirements.pip
RUN pip install -r ${repos_dir}/rally/requirements.txt
-RUN pip install -r ${repos_dir}/tempest/pip install -r requirements.txt
+RUN pip install -r ${repos_dir}/tempest/requirements.txt
RUN ${repos_dir}/rally/install_rally.sh --yes
@@ -87,6 +87,24 @@ ADD http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img /home/op
RUN gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
RUN curl -L https://get.rvm.io | bash -s stable
+RUN /bin/bash -c ". /etc/profile.d/rvm.sh \
+ && cd /home/opnfv/repos/vims-test \
+ && rvm autolibs enable"
+RUN /bin/bash -c ". /etc/profile.d/rvm.sh \
+ && cd /home/opnfv/repos/vims-test \
+ && rvm install 1.9.3"
+RUN /bin/bash -c ". /etc/profile.d/rvm.sh \
+ && cd /home/opnfv/repos/vims-test \
+ && rvm use 1.9.3"
+RUN /bin/bash -c ". /etc/profile.d/rvm.sh \
+ && cd /home/opnfv/repos/vims-test \
+ && bundle install"
+
+RUN sh -c 'curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -'
+RUN sudo apt-get install -y nodejs
+RUN cd ${repos_dir}/promise && sudo npm -g install npm@latest
+RUN cd ${repos_dir}/promise && npm install
+
RUN /bin/echo -e "set nocompatible\nset backspace=2" >> /home/opnfv/.vimrc
RUN echo "set nocompatible" >> /home/opnfv/.exrc
RUN echo "alias ll='ls -lh'" >> /home/opnfv/.bashrc
diff --git a/testcases/config_functest.py b/testcases/config_functest.py
index fa58a5639..41bf927ff 100755
--- a/testcases/config_functest.py
+++ b/testcases/config_functest.py
@@ -57,7 +57,6 @@ RALLY_INSTALLATION_DIR = functest_yaml.get("general").get("directories").get("di
RALLY_RESULT_DIR = functest_yaml.get("general").get("directories").get("dir_rally_res")
TEMPEST_REPO_DIR = functest_yaml.get("general").get("directories").get("dir_repo_tempest")
VPING_DIR = FUNCTEST_REPO + functest_yaml.get("general").get("directories").get("dir_vping")
-VIMS_TEST_DIR = functest_yaml.get("general").get("directories").get("dir_repo_vims_test")
ODL_DIR = FUNCTEST_REPO + functest_yaml.get("general").get("directories").get("dir_odl")
DATA_DIR = functest_yaml.get("general").get("directories").get("dir_functest_data")
@@ -117,25 +116,6 @@ def action_start():
action_clean()
exit(-1)
- logger.info("Installing Ruby libraries for vIMS testcase...")
- # Install ruby libraries for vims test-case
- script = 'source /etc/profile.d/rvm.sh; '
- script += 'cd ' + VIMS_TEST_DIR + '; '
- script += 'rvm autolibs enable ;'
- script += 'rvm install 1.9.3; '
- script += 'rvm use 1.9.3;'
- script += 'bundle install'
-
- logger_debug = None
- CI_DEBUG = os.environ.get("CI_DEBUG")
- if CI_DEBUG == "true" or CI_DEBUG == "True":
- logger_debug = logger
-
- cmd = "/bin/bash -c '" + script + "'"
- functest_utils.execute_command(cmd, logger = logger_debug, exit_on_error=False)
-
- install_promise(logger_debug)
-
# Create result folder under functest if necessary
if not os.path.exists(RALLY_RESULT_DIR):
os.makedirs(RALLY_RESULT_DIR)
@@ -230,25 +210,6 @@ def install_rally():
return True
-def install_promise(logger_debug):
- logger.info("Installing dependencies for Promise testcase...")
- current_dir = os.getcwd()
- os.chdir(REPOS_DIR+'/promise/')
-
- cmd = 'curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -'
- functest_utils.execute_command(cmd,logger = logger_debug, exit_on_error=False)
-
- cmd = 'sudo apt-get install -y nodejs'
- functest_utils.execute_command(cmd,logger = logger_debug, exit_on_error=False)
-
- cmd = 'sudo npm -g install npm@latest'
- functest_utils.execute_command(cmd,logger = logger_debug, exit_on_error=False)
-
- cmd = 'npm install'
- functest_utils.execute_command(cmd,logger = logger_debug, exit_on_error=False)
- os.chdir(current_dir)
-
-
def check_rally():
"""
Check if Rally is installed and properly configured