+ # Build prod_vpp_agent docker image
+ cd docker/prod/ &&\
+ sudo docker build --tag prod_vpp_agent --no-cache . || {
+ die 1 "Failed to build Docker image!"
+ }
+ # Export Docker image
+ sudo docker save prod_vpp_agent | gzip > prod_vpp_agent.tar.gz || {
+ die 1 "Failed to save Docker image!"
+ }
+ DOCKER_IMAGE="$( readlink -f prod_vpp_agent.tar.gz | tr '\n' ' ' )"
+ rm -r ${DOWNLOAD_DIR}/vpp*
+ mv ${DOCKER_IMAGE} ${DOWNLOAD_DIR}/
+ ;;
+ *dpdk*)
+ DUT="dpdk"
+
+ DPDK_REPO='https://fast.dpdk.org/rel/'
+ # Use downloaded packages with specific version
+ if [[ "$TEST_CODE" == *daily* ]] || \
+ [[ "$TEST_CODE" == *weekly* ]] || \
+ [[ "$TEST_CODE" == *timed* ]];
+ then
+ echo "Downloading latest DPDK packages from repo..."
+ DPDK_STABLE_VER=$(wget --no-check-certificate --quiet -O - ${DPDK_REPO} | \
+ grep -v '2015' | grep -Eo 'dpdk-[^\"]+xz' | tail -1)
+ else
+ echo "Downloading DPDK packages of specific version from repo..."
+ DPDK_STABLE_VER='dpdk-18.05.tar.xz'
+ fi
+ if [[ ! -f ${DPDK_STABLE_VER} ]]; then
+ wget --no-check-certificate ${DPDK_REPO}${DPDK_STABLE_VER} || {
+ die 1 "Failed to get DPDK package from ${DPDK_REPO}!"
+ }
+ fi
+ ;;
+ *)
+ die 1 "Unable to identify DUT type from: ${TEST_CODE}!"
+ ;;
+esac
+cd ${SCRIPT_DIR}
+
+if [[ ! "$(ls -A ${DOWNLOAD_DIR})" ]]; then
+ die 1 "No artifacts downloaded!"
+fi
+
+# ENVIRONMENT PREPARATION
+rm -rf env