summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xjjb/apex/apex-deploy.sh7
-rw-r--r--jjb/compass4nfv/compass-deploy.sh18
-rw-r--r--jjb/fuel/fuel-ci-jobs.yml89
-rw-r--r--jjb/functest/functest-ci-jobs.yml8
-rwxr-xr-xjjb/kvmfornfv/kvmfornfv-download-artifact.sh3
-rwxr-xr-xjjb/kvmfornfv/kvmfornfv-upload-artifact.sh10
-rw-r--r--jjb/opnfv/installer-params.yml20
-rw-r--r--jjb/opnfv/opnfv-lint.yml2
-rw-r--r--jjb/opnfv/slave-params.yml14
-rw-r--r--jjb/qtip/qtip-ci-jobs.yml7
-rw-r--r--jjb/yardstick/yardstick-ci-jobs.yml31
-rwxr-xr-xutils/fetch_os_creds.sh1
-rwxr-xr-xutils/jenkins-jnlp-connect.sh4
-rw-r--r--utils/test/reporting/functest/reportingConf.py4
-rw-r--r--utils/test/reporting/functest/testCase.py8
-rw-r--r--utils/test/result_collection_api/update/README.md28
-rwxr-xr-xutils/test/result_collection_api/update/playbook-update.sh90
-rw-r--r--utils/test/result_collection_api/update/test.yml12
18 files changed, 305 insertions, 51 deletions
diff --git a/jjb/apex/apex-deploy.sh b/jjb/apex/apex-deploy.sh
index 24ed84840..c6cfb26d1 100755
--- a/jjb/apex/apex-deploy.sh
+++ b/jjb/apex/apex-deploy.sh
@@ -72,7 +72,6 @@ if [[ "$BUILD_DIRECTORY" == *verify* ]]; then
DEPLOY_SETTINGS_DIR="${WORKSPACE}/config/deploy"
NETWORK_SETTINGS_DIR="${WORKSPACE}/config/network"
DEPLOY_CMD="$(pwd)/deploy.sh"
- UTIL_CMD="$(pwd)/util.sh"
RESOURCES="${WORKSPACE}/build/images/"
CONFIG="${WORKSPACE}/build"
LIB="${WORKSPACE}/lib"
@@ -130,7 +129,6 @@ else
DEPLOY_CMD=opnfv-deploy
DEPLOY_SETTINGS_DIR="/etc/opnfv-apex/"
- UTIL_CMD=opnfv-util
NETWORK_SETTINGS_DIR="/etc/opnfv-apex/"
RESOURCES="/var/opt/opnfv/images"
CONFIG="/var/opt/opnfv"
@@ -139,7 +137,6 @@ fi
# set env vars to deploy cmd
DEPLOY_CMD="CONFIG=${CONFIG} RESOURCES=${RESOURCES} LIB=${LIB} ${DEPLOY_CMD}"
-UTIL_CMD="CONFIG=${CONFIG} RESOURCES=${RESOURCES} LIB=${LIB} ${UTIL_CMD}"
if [ "$OPNFV_CLEAN" == 'yes' ]; then
if [[ "$BUILD_DIRECTORY" == *verify* ]]; then
@@ -193,12 +190,8 @@ if ! sudo test -e "$NETWORK_FILE"; then
exit 1
fi
-# mock detached state for deploy
-sudo $UTIL_CMD mock-detached on
# start deployment
sudo ${DEPLOY_CMD} -d ${DEPLOY_FILE} -n ${NETWORK_FILE} --debug
-# turn of mock detached state
-sudo $UTIL_CMD mock-detached off
echo
echo "--------------------------------------------------------"
diff --git a/jjb/compass4nfv/compass-deploy.sh b/jjb/compass4nfv/compass-deploy.sh
index d71316459..65e44b670 100644
--- a/jjb/compass4nfv/compass-deploy.sh
+++ b/jjb/compass4nfv/compass-deploy.sh
@@ -25,8 +25,18 @@ echo 1 > /proc/sys/vm/drop_caches
export CONFDIR=$WORKSPACE/deploy/conf
export ISO_URL=file://$BUILD_DIRECTORY/compass.iso
+cd $WORKSPACE
+
+export OS_VERSION=${COMPASS_OS_VERSION}
+export OPENSTACK_VERSION=${COMPASS_OPENSTACK_VERSION}
+if [[ "${COMPASS_OS_VERSION_OPTION}" = "xenial" ]] && [[ "${OPENSTACK_VERSION}" = "mitaka" ]]; then
+ export OPENSTACK_VERSION=${OPENSTACK_VERSION}_${COMPASS_OS_VERSION_OPTION}
+ export OS_VERSION=${COMPASS_OS_VERSION_OPTION}
+fi
+
if [[ "${DEPLOY_SCENARIO}" =~ "-ocl" ]]; then
export NETWORK_CONF_FILE=network_ocl.yml
+ export OPENSTACK_VERSION=liberty
elif [[ "${DEPLOY_SCENARIO}" =~ "-onos" ]]; then
export NETWORK_CONF_FILE=network_onos.yml
else
@@ -42,14 +52,6 @@ else
export DHA_CONF=$CONFDIR/hardware_environment/$NODE_NAME/${DEPLOY_SCENARIO}.yml
fi
-cd $WORKSPACE
-
-export OS_VERSION=${COMPASS_OS_VERSION}
-export OPENSTACK_VERSION=${COMPASS_OPENSTACK_VERSION}
-if [[ "${COMPASS_OS_VERSION_OPTION}" = "xenial" ]] && [[ "${OPENSTACK_VERSION}" = "mitaka" ]]; then
- export OPENSTACK_VERSION=${OPENSTACK_VERSION}_${COMPASS_OS_VERSION_OPTION}
- export OS_VERSION=${COMPASS_OS_VERSION_OPTION}
-fi
./deploy.sh --dha ${DHA_CONF} --network ${NETWORK_CONF}
if [ $? -ne 0 ]; then
echo "depolyment failed!"
diff --git a/jjb/fuel/fuel-ci-jobs.yml b/jjb/fuel/fuel-ci-jobs.yml
index b9e201d46..70942dd25 100644
--- a/jjb/fuel/fuel-ci-jobs.yml
+++ b/jjb/fuel/fuel-ci-jobs.yml
@@ -32,6 +32,9 @@
- zte-pod1:
slave-label: zte-pod1
<<: *master
+ - zte-pod2:
+ slave-label: zte-pod2
+ <<: *master
- zte-pod3:
slave-label: zte-pod3
<<: *master
@@ -134,7 +137,7 @@
same-node: true
block: true
- trigger-builds:
- - project: 'yardstick-fuel-{pod}-daily-{stream}'
+ - project: 'functest-fuel-{pod}-daily-{stream}'
current-parameters: false
predefined-parameters:
DEPLOY_SCENARIO={scenario}
@@ -145,7 +148,7 @@
failure-threshold: 'never'
unstable-threshold: 'FAILURE'
- trigger-builds:
- - project: 'functest-fuel-{pod}-daily-{stream}'
+ - project: 'yardstick-fuel-{pod}-daily-{stream}'
current-parameters: false
predefined-parameters:
DEPLOY_SCENARIO={scenario}
@@ -199,6 +202,9 @@
wrappers:
- build-name:
name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
+ - timeout:
+ timeout: 150
+ abort: true
builders:
- description-setter:
@@ -470,6 +476,82 @@
- timed: ''
#-----------------------------------------------
+# ZTE POD2 Triggers running against master branch
+#-----------------------------------------------
+- trigger:
+ name: 'fuel-os-nosdn-nofeature-ha-zte-pod2-daily-master-trigger'
+ triggers:
+ - timed: ''
+- trigger:
+ name: 'fuel-os-odl_l2-nofeature-ha-zte-pod2-daily-master-trigger'
+ triggers:
+ - timed: '0 18 * * *'
+- trigger:
+ name: 'fuel-os-odl_l3-nofeature-ha-zte-pod2-daily-master-trigger'
+ triggers:
+ - timed: ''
+- trigger:
+ name: 'fuel-os-onos-sfc-ha-zte-pod2-daily-master-trigger'
+ triggers:
+ - timed: ''
+- trigger:
+ name: 'fuel-os-onos-nofeature-ha-zte-pod2-daily-master-trigger'
+ triggers:
+ - timed: ''
+- trigger:
+ name: 'fuel-os-odl_l2-bgpvpn-ha-zte-pod2-daily-master-trigger'
+ triggers:
+ - timed: ''
+- trigger:
+ name: 'fuel-os-odl_l2-sfc-ha-zte-pod2-daily-master-trigger'
+ triggers:
+ - timed: ''
+- trigger:
+ name: 'fuel-os-nosdn-kvm-ha-zte-pod2-daily-master-trigger'
+ triggers:
+ - timed: ''
+- trigger:
+ name: 'fuel-os-nosdn-ovs-ha-zte-pod2-daily-master-trigger'
+ triggers:
+ - timed: ''
+# NOHA Scenarios
+- trigger:
+ name: 'fuel-os-nosdn-nofeature-noha-zte-pod2-daily-master-trigger'
+ triggers:
+ - timed: ''
+- trigger:
+ name: 'fuel-os-odl_l2-nofeature-noha-zte-pod2-daily-master-trigger'
+ triggers:
+ - timed: ''
+- trigger:
+ name: 'fuel-os-odl_l3-nofeature-noha-zte-pod2-daily-master-trigger'
+ triggers:
+ - timed: ''
+- trigger:
+ name: 'fuel-os-onos-sfc-noha-zte-pod2-daily-master-trigger'
+ triggers:
+ - timed: ''
+- trigger:
+ name: 'fuel-os-onos-nofeature-noha-zte-pod2-daily-master-trigger'
+ triggers:
+ - timed: ''
+- trigger:
+ name: 'fuel-os-odl_l2-sfc-noha-zte-pod2-daily-master-trigger'
+ triggers:
+ - timed: ''
+- trigger:
+ name: 'fuel-os-odl_l2-bgpvpn-noha-zte-pod2-daily-master-trigger'
+ triggers:
+ - timed: ''
+- trigger:
+ name: 'fuel-os-nosdn-kvm-noha-zte-pod2-daily-master-trigger'
+ triggers:
+ - timed: ''
+- trigger:
+ name: 'fuel-os-nosdn-ovs-noha-zte-pod2-daily-master-trigger'
+ triggers:
+ - timed: ''
+#-----------------------------------------------
# ZTE POD3 Triggers running against master branch
#-----------------------------------------------
- trigger:
@@ -544,4 +626,5 @@
- trigger:
name: 'fuel-os-nosdn-ovs-noha-zte-pod3-daily-master-trigger'
triggers:
- - timed: '' \ No newline at end of file
+ - timed: ''
+
diff --git a/jjb/functest/functest-ci-jobs.yml b/jjb/functest/functest-ci-jobs.yml
index e88197de8..3109fcb6e 100644
--- a/jjb/functest/functest-ci-jobs.yml
+++ b/jjb/functest/functest-ci-jobs.yml
@@ -119,6 +119,14 @@
slave-label: '{pod}'
installer: fuel
<<: *master
+ - zte-pod2:
+ slave-label: '{pod}'
+ installer: fuel
+ <<: *master
+ - zte-pod3:
+ slave-label: '{pod}'
+ installer: fuel
+ <<: *master
- arm-pod1:
slave-label: '{pod}'
installer: fuel
diff --git a/jjb/kvmfornfv/kvmfornfv-download-artifact.sh b/jjb/kvmfornfv/kvmfornfv-download-artifact.sh
index 89b7e3164..1f99f177b 100755
--- a/jjb/kvmfornfv/kvmfornfv-download-artifact.sh
+++ b/jjb/kvmfornfv/kvmfornfv-download-artifact.sh
@@ -1,4 +1,7 @@
#!/bin/bash
+set -o errexit
+set -o nounset
+set -o pipefail
if [[ "$JOB_NAME" =~ (verify|merge|daily|weekly) ]]; then
JOB_TYPE=${BASH_REMATCH[0]}
diff --git a/jjb/kvmfornfv/kvmfornfv-upload-artifact.sh b/jjb/kvmfornfv/kvmfornfv-upload-artifact.sh
index 190ab4b4d..327ea97e8 100755
--- a/jjb/kvmfornfv/kvmfornfv-upload-artifact.sh
+++ b/jjb/kvmfornfv/kvmfornfv-upload-artifact.sh
@@ -1,4 +1,6 @@
#!/bin/bash
+set -o errexit
+set -o nounset
if [[ "$JOB_NAME" =~ (verify|merge|daily|weekly) ]]; then
JOB_TYPE=${BASH_REMATCH[0]}
@@ -9,11 +11,13 @@ fi
case "$JOB_TYPE" in
verify)
- echo "Uploading artifacts for the change $GERRIT_CHANGE_NUMBER. This could take some time..."
GS_UPLOAD_LOCATION="gs://artifacts.opnfv.org/$PROJECT/review/$GERRIT_CHANGE_NUMBER"
+ echo "Removing outdated artifacts produced for the previous patch for the change $GERRIT_CHANGE_NUMBER"
+ gsutil ls $GS_UPLOAD_LOCATION > /dev/null 2>&1 && gsutil rm -r $GS_UPLOAD_LOCATION
+ echo "Uploading artifacts for the change $GERRIT_CHANGE_NUMBER. This could take some time..."
;;
daily)
- echo "Uploding daily artifacts This could take some time..."
+ echo "Uploading daily artifacts This could take some time..."
OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d_%H-%M-%S")
GS_UPLOAD_LOCATION="gs://$GS_URL/$OPNFV_ARTIFACT_VERSION"
;;
@@ -22,7 +26,7 @@ case "$JOB_TYPE" in
exit 1
esac
-gsutil cp -r $WORKSPACE/build_output $GS_UPLOAD_LOCATION > $WORKSPACE/gsutil.log 2>&1
+gsutil cp -r $WORKSPACE/build_output/* $GS_UPLOAD_LOCATION > $WORKSPACE/gsutil.log 2>&1
gsutil -m setmeta -r \
-h "Cache-Control:private, max-age=0, no-transform" \
$GS_UPLOAD_LOCATION > /dev/null 2>&1
diff --git a/jjb/opnfv/installer-params.yml b/jjb/opnfv/installer-params.yml
index 833a1d449..b7954086e 100644
--- a/jjb/opnfv/installer-params.yml
+++ b/jjb/opnfv/installer-params.yml
@@ -1,4 +1,24 @@
- parameter:
+ name: 'armband-defaults'
+ parameters:
+ - string:
+ name: INSTALLER_IP
+ default: '10.20.0.2'
+ description: 'IP of the installer'
+ - string:
+ name: INSTALLER_TYPE
+ default: fuel
+ description: 'Installer used for deploying OPNFV on this POD'
+ - string:
+ name: EXTERNAL_NETWORK
+ default: 'admin_floating_net'
+ description: 'external network for test'
+ - string:
+ name: BRIDGE
+ default: 'pxebr'
+ description: 'pxe bridge for booting of Fuel master'
+
+- parameter:
name: 'apex-defaults'
parameters:
- string:
diff --git a/jjb/opnfv/opnfv-lint.yml b/jjb/opnfv/opnfv-lint.yml
index 9611a380c..cda882e32 100644
--- a/jjb/opnfv/opnfv-lint.yml
+++ b/jjb/opnfv/opnfv-lint.yml
@@ -51,7 +51,7 @@
comment-contains-value: 'reverify'
projects:
- project-compare-type: 'REG_EXP'
- project-pattern: 'functest|sdnvpn|qtip'
+ project-pattern: 'functest|sdnvpn|qtip|daisy'
branches:
- branch-compare-type: 'ANT'
branch-pattern: '**/{branch}'
diff --git a/jjb/opnfv/slave-params.yml b/jjb/opnfv/slave-params.yml
index 4d73ad807..641ae4e51 100644
--- a/jjb/opnfv/slave-params.yml
+++ b/jjb/opnfv/slave-params.yml
@@ -336,6 +336,14 @@
name: GIT_BASE
default: https://gerrit.opnfv.org/gerrit/$PROJECT
description: 'Git URL to use on this Jenkins Slave'
+ - string:
+ name: INSTALLER_IP
+ default: '10.20.6.2'
+ description: 'IP of the installer'
+ - string:
+ name: BRIDGE
+ default: 'br6'
+ description: 'pxe bridge for booting of Fuel master'
- parameter:
name: 'zte-pod2-defaults'
parameters:
@@ -352,8 +360,12 @@
description: 'Git URL to use on this Jenkins Slave'
- string:
name: INSTALLER_IP
- default: '10.20.1.2'
+ default: '10.20.7.2'
description: 'IP of the installer'
+ - string:
+ name: BRIDGE
+ default: 'br7'
+ description: 'pxe bridge for booting of Fuel master'
- parameter:
name: 'zte-pod3-defaults'
parameters:
diff --git a/jjb/qtip/qtip-ci-jobs.yml b/jjb/qtip/qtip-ci-jobs.yml
index ef455f8df..1123d27fb 100644
--- a/jjb/qtip/qtip-ci-jobs.yml
+++ b/jjb/qtip/qtip-ci-jobs.yml
@@ -40,11 +40,11 @@
auto-trigger-name: 'daily-trigger-disabled'
- zte-pod1:
installer: fuel
- auto-trigger-name: 'qtip-daily-zte-pod1-trigger'
+ auto-trigger-name: 'daily-trigger-disabled'
<<: *master
- zte-pod2:
installer: fuel
- auto-trigger-name: 'daily-trigger-disabled'
+ auto-trigger-name: 'qtip-daily-zte-pod2-trigger'
<<: *master
#--------------------------------
@@ -188,6 +188,7 @@
# - timed : ' 0 0 * * *'
- trigger:
- name: 'qtip-daily-zte-pod1-trigger'
+ name: 'qtip-daily-zte-pod2-trigger'
triggers:
- timed: '0 5 * * *'
+
diff --git a/jjb/yardstick/yardstick-ci-jobs.yml b/jjb/yardstick/yardstick-ci-jobs.yml
index 041eabd03..c8d50a0ea 100644
--- a/jjb/yardstick/yardstick-ci-jobs.yml
+++ b/jjb/yardstick/yardstick-ci-jobs.yml
@@ -121,6 +121,21 @@
installer: fuel
auto-trigger-name: 'daily-trigger-disabled'
<<: *master
+ - zte-pod2:
+ slave-label: '{pod}'
+ installer: fuel
+ auto-trigger-name: 'daily-trigger-disabled'
+ <<: *master
+ - zte-pod3:
+ slave-label: '{pod}'
+ installer: fuel
+ auto-trigger-name: 'daily-trigger-disabled'
+ <<: *master
+ - arm-pod1:
+ slave-label: '{pod}'
+ installer: fuel
+ auto-trigger-name: 'daily-trigger-disabled'
+ <<: *master
- orange-pod2:
slave-label: '{pod}'
installer: joid
@@ -318,6 +333,14 @@
description: 'Arguments to use in order to choose the backend DB'
- parameter:
+ name: 'yardstick-params-zte-pod2'
+ parameters:
+ - string:
+ name: YARDSTICK_DB_BACKEND
+ default: '-i 104.197.68.199:8086'
+ description: 'Arguments to use in order to choose the backend DB'
+
+- parameter:
name: 'yardstick-params-zte-pod3'
parameters:
- string:
@@ -334,6 +357,14 @@
description: 'Arguments to use in order to choose the backend DB'
- parameter:
+ name: 'yardstick-params-arm-pod1'
+ parameters:
+ - string:
+ name: YARDSTICK_DB_BACKEND
+ default: '-i 104.197.68.199:8086'
+ description: 'Arguments to use in order to choose the backend DB'
+
+- parameter:
name: 'yardstick-params-virtual'
parameters:
- string:
diff --git a/utils/fetch_os_creds.sh b/utils/fetch_os_creds.sh
index e11df599b..47fbc91dc 100755
--- a/utils/fetch_os_creds.sh
+++ b/utils/fetch_os_creds.sh
@@ -142,7 +142,6 @@ elif [ "$installer_type" == "compass" ]; then
sshpass -p root ssh 2>/dev/null $ssh_options root@${installer_ip} \
"scp $ssh_options ${controller_ip}:/opt/admin-openrc.sh ." &> /dev/null
sshpass -p root scp 2>/dev/null $ssh_options root@${installer_ip}:~/admin-openrc.sh $dest_path &> /dev/null
- echo 'export OS_REGION_NAME=regionOne' >> $dest_path
info "This file contains the mgmt keystone API, we need the public one for our rc file"
public_ip=$(sshpass -p root ssh $ssh_options root@${installer_ip} \
diff --git a/utils/jenkins-jnlp-connect.sh b/utils/jenkins-jnlp-connect.sh
index d268a28de..8dcaf35c5 100755
--- a/utils/jenkins-jnlp-connect.sh
+++ b/utils/jenkins-jnlp-connect.sh
@@ -49,8 +49,8 @@ main () {
fi
if [[ $(whoami) != "root" ]]; then
- if grep "^Defaults requiretty" /etc/sudoers
- then echo "please comment out Defaults requiretty from /etc/sudoers"
+ if sudo -l | grep "requiretty"; then
+ echo "please comment out Defaults requiretty from /etc/sudoers"
exit 1
fi
fi
diff --git a/utils/test/reporting/functest/reportingConf.py b/utils/test/reporting/functest/reportingConf.py
index 9c618a274..1c0b0577d 100644
--- a/utils/test/reporting/functest/reportingConf.py
+++ b/utils/test/reporting/functest/reportingConf.py
@@ -12,7 +12,7 @@
installers = ["apex", "compass", "fuel", "joid"]
# list of test cases declared in testcases.yaml but that must not be
# taken into account for the scoring
-blacklist = ["ovno", "security_scan"]
+blacklist = ["ovno", "odl", "security_scan"]
# versions = ["brahmaputra", "master"]
versions = ["master"]
PERIOD = 50
@@ -23,5 +23,5 @@ NB_TESTS = 5
REPORTING_PATH = "."
URL_BASE = 'http://testresults.opnfv.org/test/api/v1/results'
TEST_CONF = "https://git.opnfv.org/cgit/functest/plain/ci/testcases.yaml"
-LOG_LEVEL = "DEBUG"
+LOG_LEVEL = "ERROR"
LOG_FILE = REPORTING_PATH + "/reporting.log"
diff --git a/utils/test/reporting/functest/testCase.py b/utils/test/reporting/functest/testCase.py
index e97303533..a906f0da8 100644
--- a/utils/test/reporting/functest/testCase.py
+++ b/utils/test/reporting/functest/testCase.py
@@ -39,7 +39,8 @@ class TestCase(object):
'multisite': 'multisite',
'domino': 'domino',
'odl-sfc': 'SFC',
- 'onos_sfc': 'SFC'
+ 'onos_sfc': 'SFC',
+ 'parser':'parser'
}
try:
self.displayName = display_name_matrix[self.name]
@@ -126,12 +127,13 @@ class TestCase(object):
'doctor': 'doctor-notification',
'promise': 'promise',
'moon': 'moon',
- 'copper': 'copper',
+ 'copper': 'copper-notification',
'security_scan': 'security',
'multisite': 'multisite',
'domino': 'domino-multinode',
'odl-sfc': 'odl-sfc',
- 'onos_sfc': 'onos_sfc'
+ 'onos_sfc': 'onos_sfc',
+ 'parser':'parser-basics'
}
try:
return test_match_matrix[self.name]
diff --git a/utils/test/result_collection_api/update/README.md b/utils/test/result_collection_api/update/README.md
index 738f30ab7..cb0e67b33 100644
--- a/utils/test/result_collection_api/update/README.md
+++ b/utils/test/result_collection_api/update/README.md
@@ -79,27 +79,21 @@ install ansible, please refer:
```
http://docs.ansible.com/ansible/intro_installation.html
```
-run update.yml
+
+playbook-update.sh
+
arguments:
-: host: remote server, must provide
-user: user used to access to remote server, default to root
-port: exposed port used to access to testapi, default to 8000
-image: testapi's docker image, default to opnfv/testapi:latest
-update_path: templates directory in remote server, default to /tmp/testapi
-mongodb_url: url of mongodb, default to 172.17.0.1, docker0 ip
-swagger_url: swagger access url, default to http://host:port
+: -h|--help show this help text
+-r|--remote remote server
+-u|--user ssh username used to access to remote server
+-i|--identity ssh PublicKey file used to access to remote server
+-e|--execute execute update, if not set just check the ansible connectivity
usage:
```
-ansible-playbook update.yml --extra-vars "
-host=10.63.243.17
-user=zte
-port=8000
-image=opnfv/testapi
-mode=build
-update_path=/tmp/testapi
-mongodb_url=mongodb://172.17.0.1:27017
-swagger_url=http://10.63.243.17:8000"```
+ssh-agent ./playbook-update.sh -r testresults.opnfv.org -u serena -i ~/.ssh/id_rsa -e
+```
+
> **Note:**
> - If documents need to be changed, please modify file
diff --git a/utils/test/result_collection_api/update/playbook-update.sh b/utils/test/result_collection_api/update/playbook-update.sh
new file mode 100755
index 000000000..86d30e4b2
--- /dev/null
+++ b/utils/test/result_collection_api/update/playbook-update.sh
@@ -0,0 +1,90 @@
+#!/bin/bash
+
+#
+# Author: Serena Feng (feng.xiaoewi@zte.com.cn)
+# Update testapi on remote server using ansible playbook automatically
+#
+#
+# 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 -e
+
+usage="Script to trigger update automatically.
+
+usage:
+ bash $(basename "$0") [-h|--help] [-h <host>] [-u username] [-i identityfile] [-e|--execute]
+
+where:
+ -h|--help show this help text
+ -r|--remote remote server
+ -u|--user ssh username used to access to remote server
+ -i|--identity ssh PublicKey file used to access to remote server
+ -e|--execute execute update, if not set just check the ansible connectivity"
+
+remote=testresults.opnfv.org
+user=root
+identity=~/.ssh/id_rsa
+hosts=./hosts
+execute=false
+
+# Parse parameters
+while [[ $# > 0 ]]
+ do
+ key="$1"
+ case $key in
+ -h|--help)
+ echo "$usage"
+ exit 0
+ shift
+ ;;
+ -r|--remote)
+ remote="$2"
+ shift
+ ;;
+ -u|--user)
+ user="$2"
+ shift
+ ;;
+ -i|--identity)
+ identity="$2"
+ shift
+ ;;
+ -e|--execute)
+ execute=true
+ ;;
+ *)
+ echo "unknown option"
+ exit 1
+ ;;
+ esac
+ shift # past argument or value
+done
+
+echo $remote > $hosts
+
+echo "add authentication"
+ssh-add $identity
+
+echo "test ansible connectivity"
+ansible -i ./hosts $remote -m ping -u $user
+
+echo "test playbook connectivity"
+ansible-playbook -i $hosts test.yml -e "host=$remote user=$user"
+
+if [ $execute == true ]; then
+ echo "do update"
+ ansible-playbook -i $hosts update.yml -e "host=$remote \
+ user=$user \
+ port=8082 \
+ image=opnfv/testapi \
+ update_path=/home/$user/testapi \
+ mongodb_url=mongodb://172.17.0.1:27017 \
+ swagger_url=http://testresults.opnfv.org/test"
+fi
+
+rm -fr $hosts
+ssh-agent -k
diff --git a/utils/test/result_collection_api/update/test.yml b/utils/test/result_collection_api/update/test.yml
new file mode 100644
index 000000000..a8868720d
--- /dev/null
+++ b/utils/test/result_collection_api/update/test.yml
@@ -0,0 +1,12 @@
+---
+- hosts: "{{ host }}"
+ remote_user: "{{ user }}"
+ become: yes
+ become_method: sudo
+ vars:
+ user: "root"
+ tasks:
+ - name: test connectivity
+ command: "echo hello {{ host }}"
+ register: result
+ - debug: msg="{{ result }}"