summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
3db5a7e)
An aarch64 image was created for functest in
https://gerrit.opnfv.org/gerrit/#/c/27801/
This image is build and pushed with
https://gerrit.opnfv.org/gerrit/#/c/28291/
In this commit, the aarch64 image is pulled when an aarch64
jenkins slave is used for running functest.
JIRA: ARMBAND-180
Change-Id: Idfe7115275a056ef5137cff0a963910c2707457c
Signed-off-by: Cristina Pauna <cristina.pauna@enea.com>
- string:
name: CLEAN_DOCKER_IMAGES
default: 'false'
- string:
name: CLEAN_DOCKER_IMAGES
default: 'false'
- description: 'Remove downloaded docker images (opnfv/functest:*)'
+ description: 'Remove downloaded docker images (opnfv/functest*:*)'
- functest-parameter:
gs-pathname: '{gs-pathname}'
- functest-parameter:
gs-pathname: '{gs-pathname}'
[[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null"
echo "Cleaning up docker containers/images..."
[[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null"
echo "Cleaning up docker containers/images..."
FUNCTEST_IMAGE=opnfv/functest
FUNCTEST_IMAGE=opnfv/functest
-# Remove containers along with image opnfv/functest:<none>
+if [ "$HOST_ARCH" = "aarch64" ]; then
+ FUNCTEST_IMAGE="${FUNCTEST_IMAGE}_${HOST_ARCH}"
+fi
+
+# Remove containers along with image opnfv/functest*:<none>
dangling_images=($(docker images -f "dangling=true" | grep $FUNCTEST_IMAGE | awk '{print $3}'))
if [[ -n ${dangling_images} ]]; then
echo " Removing $FUNCTEST_IMAGE:<none> images and their containers..."
dangling_images=($(docker images -f "dangling=true" | grep $FUNCTEST_IMAGE | awk '{print $3}'))
if [[ -n ${dangling_images} ]]; then
echo " Removing $FUNCTEST_IMAGE:<none> images and their containers..."
volumes="${results_vol} ${sshkey_vol} ${stackrc_vol} ${rc_file_vol}"
volumes="${results_vol} ${sshkey_vol} ${stackrc_vol} ${rc_file_vol}"
+HOST_ARCH=$(uname -m)
+FUNCTEST_IMAGE="opnfv/functest"
+if [ "$HOST_ARCH" = "aarch64" ]; then
+ FUNCTEST_IMAGE="${FUNCTEST_IMAGE}_${HOST_ARCH}"
+fi
-echo "Functest: Pulling image opnfv/functest:${DOCKER_TAG}"
-docker pull opnfv/functest:$DOCKER_TAG >/dev/null
+echo "Functest: Pulling image ${FUNCTEST_IMAGE}:${DOCKER_TAG}"
+docker pull ${FUNCTEST_IMAGE}:$DOCKER_TAG >/dev/null
cmd="sudo docker run --privileged=true -id ${envs} ${volumes} \
${custom_params} ${TESTCASE_OPTIONS} \
cmd="sudo docker run --privileged=true -id ${envs} ${volumes} \
${custom_params} ${TESTCASE_OPTIONS} \
- opnfv/functest:${DOCKER_TAG} /bin/bash"
+ ${FUNCTEST_IMAGE}:${DOCKER_TAG} /bin/bash"
echo "Functest: Running docker run command: ${cmd}"
${cmd} >${redirect}
sleep 5
echo "Functest: Running docker run command: ${cmd}"
${cmd} >${redirect}
sleep 5
-container_id=$(docker ps | grep "opnfv/functest:${DOCKER_TAG}" | awk '{print $1}' | head -1)
+container_id=$(docker ps | grep "${FUNCTEST_IMAGE}:${DOCKER_TAG}" | awk '{print $1}' | head -1)
echo "Container ID=${container_id}"
if [ -z ${container_id} ]; then
echo "Cannot find opnfv/functest container ID ${container_id}. Please check if it is existing."
echo "Container ID=${container_id}"
if [ -z ${container_id} ]; then
echo "Cannot find opnfv/functest container ID ${container_id}. Please check if it is existing."
docker start ${container_id}
sleep 5
docker ps >${redirect}
docker start ${container_id}
sleep 5
docker ps >${redirect}
-if [ $(docker ps | grep "opnfv/functest:${DOCKER_TAG}" | wc -l) == 0 ]; then
- echo "The container opnfv/functest with ID=${container_id} has not been properly started. Exiting..."
+if [ $(docker ps | grep "${FUNCTEST_IMAGE}:${DOCKER_TAG}" | wc -l) == 0 ]; then
+ echo "The container ${FUNCTEST_IMAGE} with ID=${container_id} has not been properly started. Exiting..."
exit 1
fi
if [[ "$BRANCH" =~ 'brahmaputra' ]]; then
exit 1
fi
if [[ "$BRANCH" =~ 'brahmaputra' ]]; then