summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQiLiang <liangqi1@huawei.com>2018-03-22 20:39:00 +0800
committerQiLiang <liangqi1@huawei.com>2018-03-22 20:44:21 +0800
commit3767322931b6be4bf5e229352013eaba559d7fba (patch)
tree3c190a4c6ab3add63f85cd0f5973c05d1ec186de
parentd6d4f31e144bc912411baab96ec7cd66b8229800 (diff)
Add clover ci deploy skeleton
- create kubernetes + istio by continer4nfv kubeadm_istio scenario - add clover real test entry script - add basic .gitignore Change-Id: I3b36cdf71d70db4e24a19e386ad39dbb0a71ac2f Signed-off-by: QiLiang <liangqi1@huawei.com>
-rw-r--r--.gitignore37
-rwxr-xr-xci/deploy.sh30
-rwxr-xr-xci/test.sh12
3 files changed, 79 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..988165b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,37 @@
+*.DS_Store
+*.log
+*.pyc
+.vimrc
+.ropeproject
+.settings/
+.eggs/
+*.orig
+*.BACKUP.*
+*.BASE.*
+*.LOCAL.*
+*.REMOTE.*
+*.egg
+*.egg-info
+build
+htmlcov
+.agignore
+.coverage
+*.retry
+Session*.vim
+.tags*
+.coverage.*
+*~
+setuptools*zip
+dist/
+.testrepository/
+cover/
+.*.sw?
+/docs_build/
+/docs_output/
+/docs/apidocs/yardstick*.rst
+#PyCharm IDE project configuration files
+.idea/
+# tox virtualenvs
+.tox/
+# work env
+work/
diff --git a/ci/deploy.sh b/ci/deploy.sh
index 6280fd2..d5d46b4 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -9,4 +9,34 @@
#
set -ex
+CLOVER_BASE_DIR=`cd ${BASH_SOURCE[0]%/*}/..;pwd`
+CLOVER_WORK_DIR=$CLOVER_BASE_DIR/work
+MASTER_NODE_NAME='master'
+
+mkdir -p $CLOVER_WORK_DIR
+cd $CLOVER_WORK_DIR
+
+# Fetch container4nfv source code
+if [ -d container4nfv ]; then
+ rm -rf container4nfv
+fi
+git clone https://git.opnfv.org/container4nfv/
+cd container4nfv
+
+# Create kubernetes + istio env
+./src/vagrant/kubeadm_istio/deploy.sh
+
+# Fetch kube-master node info
+cd src/vagrant/kubeadm_istio
+MASTER_NODE_HOST=$(vagrant ssh-config $MASTER_NODE_NAME | awk '/HostName /{print $2}')
+MASTER_NODE_USER=$(vagrant ssh-config $MASTER_NODE_NAME | awk '/User /{print $2}')
+MASTER_NODE_KEY=$(vagrant ssh-config $MASTER_NODE_NAME | awk '/IdentityFile /{print $2}')
+
+# Push clover source code to kube-master node
+ssh -i $MASTER_NODE_KEY ${MASTER_NODE_USER}@${MASTER_NODE_HOST} rm -rf clover
+scp -i $MASTER_NODE_KEY -r $CLOVER_BASE_DIR ${MASTER_NODE_USER}@${MASTER_NODE_HOST}:clover
+
+# Run test
+ssh -i $MASTER_NODE_KEY ${MASTER_NODE_USER}@${MASTER_NODE_HOST} ./clover/ci/test.sh
+
echo "Clover deploy complete!"
diff --git a/ci/test.sh b/ci/test.sh
new file mode 100755
index 0000000..4e0ccc5
--- /dev/null
+++ b/ci/test.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+#
+# Copyright (c) Authors of Clover
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+set -ex
+
+echo "Clover test complete!"