diff options
author | Yujun Zhang <zhang.yujunz@zte.com.cn> | 2017-09-08 17:08:59 +0800 |
---|---|---|
committer | Yujun Zhang <zhang.yujunz@zte.com.cn> | 2017-09-13 15:48:48 +0800 |
commit | 2bf95e68a19fc3a7c1e3236a977b1d3b6db1c05c (patch) | |
tree | c533c1182ffa2314c95c82edf44b9475f8e7f294 /tests/ci/experimental.sh | |
parent | 4154a75853f6ba004de775194ebffbe00b591012 (diff) |
Refactor CI scripts
- Move scripts executed inside container to qtip/scripts
- tests/ci is limited to setup the environment and start services
Change-Id: I454c715890601c6c6472006c2f0f6131695c2f51
Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn>
Diffstat (limited to 'tests/ci/experimental.sh')
-rwxr-xr-x[-rw-r--r--] | tests/ci/experimental.sh | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/tests/ci/experimental.sh b/tests/ci/experimental.sh index 3dd15d56..bb9694b7 100644..100755 --- a/tests/ci/experimental.sh +++ b/tests/ci/experimental.sh @@ -12,25 +12,26 @@ set -o pipefail set -o nounset set -x +script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + export DEPLOY_SCENARIO='generic' export DOCKER_TAG='latest' export CI_DEBUG='false' export TEST_SUITE='storage' export TESTAPI_URL='' +export SSH_CREDENTIALS='/root/.ssh' export WORKSPACE=${WORKSPACE:-$(pwd)} -script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -qtip_repo='/home/opnfv/repos/qtip' +source ${script_dir}/utils/start_services.sh -source $script_dir/launch_containers_by_testsuite.sh +cd ${WORKSPACE} -container_id=$(docker ps | grep "opnfv/qtip:${DOCKER_TAG}" | awk '{print $1}' | head -1) +qtip_repo='/home/opnfv/repos/qtip' +docker cp . ${TEST_SUITE}_qtip:${qtip_repo} +docker exec ${TEST_SUITE}_qtip bash -c "cd ${qtip_repo} && pip install -U -e ." -echo "QTIP: Copying current submit patch to the container ${container_id}" -cd $WORKSPACE -docker cp . ${container_id}:${qtip_repo} -docker exec ${container_id} bash -c "cd ${qtip_repo} && pip install -U -e ." -docker exec -t ${container_id} bash -x ${qtip_repo}/tests/ci/run_${TEST_SUITE}_qpi.sh +docker exec -t ${TEST_SUITE}_qtip bash -x ${qtip_repo}/qtip/scripts/quickstart.sh echo "QTIP: Verify ${TEST_SUITE} done!" + exit 0 |