- - shell: |
- #!/bin/bash
- echo "Qtip: Start Docker and prepare environment"
- envs="INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} -e NODE_NAME=${NODE_NAME}"
- suite="TEST_CASE=all"
- docker pull opnfv/qtip:latest
- cmd=" docker run -id -e $envs -e $suite opnfv/qtip:latest /bin/bash"
- echo "Qtip: Running docker run command: ${cmd}"
- ${cmd}
- docker ps -a
- container_id=$(docker ps | grep 'opnfv/qtip:latest' | awk '{print $1}' | head -1)
- if [ $(docker ps | grep 'opnfv/qtip' | wc -l) == 0 ]; then
- echo "The container opnfv/qtip with ID=${container_id} has not been properly started. Exiting..."
- exit 1
- fi
-- builder:
- name: qtip-run-suite
- builders:
- - shell: |
- #!/bin/bash
- container_id=$(docker ps | grep 'opnfv/qtip:latest' | awk '{print $1}' | head -1)
- if [[ ! -z ${container_id} ]]; then
- echo "The container ID is: ${container_id}"
- QTIP_REPO=/home/opnfv/repos/qtip
- docker exec -t ${container_id} $QTIP_REPO/docker/run_qtip.sh
- else
- echo "Container ID not available"
- fi
-
-- builder:
- name: qtip-pushtoDB
- builders:
- - shell: |
- #!/bin/bash
-
- echo "Pushing available results to DB"
- echo "The container id is:"
- container_id=$(docker ps | grep 'opnfv/qtip:latest' | awk '{print $1}' | head -1)
- if [[ ! -z ${container_id} ]]; then
- echo "The condiner ID is: ${container_id}"
- QTIP_REPO=/home/opnfv/repos/qtip
- docker exec -t ${container_id} $QTIP_REPO/docker/push_db.sh
- else
- echo "Container ID not available"
- fi