+ - shell:
+ !include-raw ../opnfvdocs/docu-build.sh
+
+########################
+# parameter macros
+########################
+- parameter:
+ name: functest-parameter
+ parameters:
+ - string:
+ name: GS_PATHNAME
+ default: '{gs-pathname}'
+ description: "Version directory where the opnfv documents will be stored in gs repository"
+ - string:
+ name: FUNCTEST_REPO_DIR
+ default: "/home/opnfv/repos/functest"
+ description: "Directory where the Functest repository is cloned"
+
+- parameter:
+ name: orange-build
+ parameters:
+ - string:
+ name: GIT_BASE
+ default: https://gerrit.opnfv.org/gerrit/$PROJECT
+ description: "Override GIT_BASE"
+
+- parameter:
+ name: opnfv-jump-1
+ parameters:
+ - string:
+ name: GIT_BASE
+ default: ssh://gerrit.opnfv.org:29418/$PROJECT
+ description: "Override GIT_BASE"
+
+- parameter:
+ name: opnfv-jump-2
+ parameters:
+ - string:
+ name: GIT_BASE
+ default: ssh://gerrit.opnfv.org:29418/$PROJECT
+ description: "Override GIT_BASE"
+########################
+# trigger macros
+########################
+- trigger:
+ name: 'functest-master'
+ triggers:
+ - pollscm: "H 9 * * *"
+
+- trigger:
+ name: 'functest-stable-arno'
+ triggers:
+ - pollscm: "H 21 * * *"
+
+########################
+# builder macros
+########################
+# macros
+- builder:
+ name: functest-all
+ builders:
+ - shell: |
+ #!/bin/bash
+ set +e
+
+ echo "Functest: running all the tests"
+ cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh"
+ container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1)
+ docker exec $container_id $cmd
+
+- builder:
+ name: set-functest-env
+ builders:
+ - shell: |
+ #!/bin/bash
+ set +e
+ if [[ ${INSTALLER_TYPE} == 'apex' ]]; then
+ INSTALLER_IP=$(cat instack /var/lib/libvirt/dnsmasq/default.leases \
+ |sed 's/.*192/192/g' | sed 's/\ in.*//g')
+ fi
+ echo "Functest: Start Docker and prepare environment"
+ envs="INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP}"
+ docker pull opnfv/functest:latest_stable
+ echo "Functest: Running docker run command: docker run -i -e $envs opnfv/functest /bin/bash &"
+ docker run -i -e $envs opnfv/functest /bin/bash &
+ docker ps -a
+ sleep 5
+ container_id=$(docker ps -a | grep opnfv/functest | 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."
+ docker ps -a
+ exit 1
+ fi
+ echo "Starting the container: docker start ${container_id}"
+ docker start ${container_id}
+ sleep 5
+ docker ps
+ if [ $(docker ps | grep opnfv/functest | wc -l) == 0 ]; then
+ echo "The container opnfv/functest with ID=${container_id} has not been properly started. Exiting..."
+ exit 1
+ fi
+ cmd="${FUNCTEST_REPO_DIR}/docker/prepare_env.sh"
+ echo "Executing command inside the docker: ${cmd}"
+ docker exec ${container_id} ${cmd}
+
+- builder:
+ name: functest-vping
+ builders:
+ - shell: |
+ #!/bin/bash
+ set +e
+
+ echo "Functest: run vPing"
+ cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh --test vping"
+ container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1)
+ docker exec $container_id $cmd
+
+- builder:
+ name: functest-odl
+ builders: