summaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
authorStephen Wong <stephen.kf.wong@gmail.com>2018-11-01 06:50:01 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-11-01 06:50:01 +0000
commitd7cd508fc71bdacfb0743568e6a9a584b2d8bf52 (patch)
tree5f89d33ac1d98e51b08dfe3f6d5bbfb67c892a12 /ci
parent6e5c74f40cecd61e216a2ba01dc0860eeab02347 (diff)
parent1be9086330f4df2dc0c4fce25d48db540ed23885 (diff)
Merge "Add initial Istio validation testcase for CI" into stable/gambia
Diffstat (limited to 'ci')
-rwxr-xr-xci/deploy.sh9
-rwxr-xr-xci/sdc_setup.sh27
-rwxr-xr-xci/test.sh12
3 files changed, 33 insertions, 15 deletions
diff --git a/ci/deploy.sh b/ci/deploy.sh
index 2580dbc..4bdce89 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -15,7 +15,7 @@ MASTER_NODE_NAME="master"
SSH_OPTIONS="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
K8S_ISTIO_DEPLOY_TIMEOUT=3600
-FUNCTEST_IMAGE="opnfv/functest-kubernetes:latest"
+FUNCTEST_IMAGE="opnfv/functest-kubernetes-features:amd64-gambia"
INSTALLER_TYPE="container4nfv"
DEPLOY_SCENARIO="k8-istio-clover"
@@ -42,8 +42,8 @@ MASTER_NODE_KEY=$(vagrant ssh-config $MASTER_NODE_NAME | awk '/IdentityFile /{pr
ssh $SSH_OPTIONS -i $MASTER_NODE_KEY ${MASTER_NODE_USER}@${MASTER_NODE_HOST} rm -rf clover
scp $SSH_OPTIONS -i $MASTER_NODE_KEY -r $CLOVER_BASE_DIR ${MASTER_NODE_USER}@${MASTER_NODE_HOST}:clover
-# Run test
-ssh $SSH_OPTIONS -i $MASTER_NODE_KEY ${MASTER_NODE_USER}@${MASTER_NODE_HOST} ./clover/ci/test.sh
+# Deploy SDC sample for Functest test
+ssh $SSH_OPTIONS -i $MASTER_NODE_KEY ${MASTER_NODE_USER}@${MASTER_NODE_HOST} ./clover/ci/sdc_setup.sh
echo "Clover deploy complete!"
@@ -63,6 +63,9 @@ echo "export KUBE_MASTER_URL=$KUBE_MASTER_URL" >> $RC_FILE
KUBE_MASTER_IP=$(echo $KUBE_MASTER_URL | awk -F'https://|:[0-9]+' '$0=$2')
echo "export KUBE_MASTER_IP=$KUBE_MASTER_IP" >> $RC_FILE
+# Restart docker service in case Container4NFV CI job delete docker0 bridge
+systemctl restart docker
+
# Run functest
sudo docker pull $FUNCTEST_IMAGE
sudo docker run --rm \
diff --git a/ci/sdc_setup.sh b/ci/sdc_setup.sh
new file mode 100755
index 0000000..f4d82f5
--- /dev/null
+++ b/ci/sdc_setup.sh
@@ -0,0 +1,27 @@
+#!/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
+
+# Deploy Clover SDC sample
+kubectl apply -f <(istioctl kube-inject -f ~/clover/samples/scenarios/service_delivery_controller_opnfv.yaml)
+
+# Wait for SDC sample deployed
+kubectl get services
+kubectl get pods
+
+r="0"
+while [ $r -ne "10" ]
+do
+ sleep 30
+ kubectl get pods
+ r=$(kubectl get pods | grep Running | wc -l)
+done
+
+echo "Set up Clover SDC sample complete!"
diff --git a/ci/test.sh b/ci/test.sh
deleted file mode 100755
index 4e0ccc5..0000000
--- a/ci/test.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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!"