Code Review
/
releng.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "update scenario and related unittest"
[releng.git]
/
jjb
/
yardstick
/
yardstick-daily.sh
diff --git
a/jjb/yardstick/yardstick-daily.sh
b/jjb/yardstick/yardstick-daily.sh
index
51fc9c8
..
f769e9c
100755
(executable)
--- a/
jjb/yardstick/yardstick-daily.sh
+++ b/
jjb/yardstick/yardstick-daily.sh
@@
-23,17
+23,30
@@
elif [[ ${INSTALLER_TYPE} == 'joid' ]]; then
# replace the default one by the customized one provided by jenkins config
fi
# replace the default one by the customized one provided by jenkins config
fi
+# Set iptables rule to allow forwarding return traffic for container
+if ! sudo iptables -C FORWARD -j RETURN 2> ${redirect} || ! sudo iptables -L FORWARD | awk 'NR==3' | grep RETURN 2> ${redirect}; then
+ sudo iptables -I FORWARD -j RETURN
+fi
+
opts="--privileged=true --rm"
envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} \
-e NODE_NAME=${NODE_NAME} -e EXTERNAL_NETWORK=${EXTERNAL_NETWORK} \
opts="--privileged=true --rm"
envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} \
-e NODE_NAME=${NODE_NAME} -e EXTERNAL_NETWORK=${EXTERNAL_NETWORK} \
- -e YARDSTICK_BRANCH=${
GIT_BRANCH##origin/
} -e DEPLOY_SCENARIO=${DEPLOY_SCENARIO}"
+ -e YARDSTICK_BRANCH=${
BRANCH
} -e DEPLOY_SCENARIO=${DEPLOY_SCENARIO}"
-# Pull the latest image
+# Pull the image with correct tag
+echo "Yardstick: Pulling image opnfv/yardstick:${DOCKER_TAG}"
docker pull opnfv/yardstick:$DOCKER_TAG >$redirect
docker pull opnfv/yardstick:$DOCKER_TAG >$redirect
+# map log directory
+branch=${BRANCH##*/}
+dir_result="${HOME}/opnfv/yardstick/results/${branch}"
+mkdir -p ${dir_result}
+sudo rm -rf ${dir_result}/*
+map_log_dir="-v ${dir_result}:/tmp/yardstick"
+
# Run docker
# Run docker
-cmd="sudo docker run ${opts} ${envs} ${labconfig} ${
sshkey} opnfv/yardstick
\
-
run_tests.sh ${YARDSTICK_DB_BACKEND} ${YARDSTICK
_SUITE_NAME}"
+cmd="sudo docker run ${opts} ${envs} ${labconfig} ${
map_log_dir} ${sshkey} opnfv/yardstick:${DOCKER_TAG}
\
+
exec_tests.sh ${YARDSTICK_DB_BACKEND} ${YARDSTICK_SCENARIO
_SUITE_NAME}"
echo "Yardstick: Running docker cmd: ${cmd}"
${cmd}
echo "Yardstick: Running docker cmd: ${cmd}"
${cmd}