diff options
28 files changed, 298 insertions, 130 deletions
diff --git a/jjb/3rd_party_ci/odl-netvirt.yml b/jjb/3rd_party_ci/odl-netvirt.yml index 01017f307..863eb94dd 100644 --- a/jjb/3rd_party_ci/odl-netvirt.yml +++ b/jjb/3rd_party_ci/odl-netvirt.yml @@ -137,6 +137,7 @@ - name: 'functest-netvirt-virtual-suite-master' predefined-parameters: | DEPLOY_SCENARIO=os-odl_l3-nofeature-ha + FUNCTEST_MODE=testcase FUNCTEST_SUITE_NAME=odl_netvirt RC_FILE_PATH=$HOME/cloner-info/overcloudrc node-parameters: true diff --git a/jjb/apex/apex-build.sh b/jjb/apex/apex-build.sh index 23ce81015..cf5999832 100755 --- a/jjb/apex/apex-build.sh +++ b/jjb/apex/apex-build.sh @@ -46,6 +46,12 @@ echo "Cache Directory Contents:" echo "-------------------------" ls -al $CACHE_DIRECTORY +if [[ "$BUILD_ARGS" =~ '--iso' ]]; then + mkdir -p /tmp/apex-iso/ + rm -f /tmp/apex-iso/*.iso + cp -f $BUILD_DIRECTORY/../.build/release/OPNFV-CentOS-7-x86_64-$OPNFV_ARTIFACT_VERSION.iso /tmp/apex-iso/ +fi + if ! echo $ARTIFACT_VERSION | grep "dev" 1> /dev/null; then echo "Writing opnfv.properties file" # save information regarding artifact into file diff --git a/jjb/apex/apex-iso-verify.sh b/jjb/apex/apex-iso-verify.sh index f102421f3..4faeb607e 100755 --- a/jjb/apex/apex-iso-verify.sh +++ b/jjb/apex/apex-iso-verify.sh @@ -8,7 +8,14 @@ echo "Starting the Apex iso verify." echo "--------------------------------------------------------" echo -source $BUILD_DIRECTORY/../opnfv.properties +# Must be RPMs/ISO +echo "Downloading latest properties file" + +# get the properties file in order to get info regarding artifacts +curl --fail -s -o opnfv.properties http://$GS_URL/latest.properties + +# source the file so we get OPNFV vars +source opnfv.properties if ! rpm -q virt-install > /dev/null; then sudo yum -y install virt-install @@ -35,9 +42,9 @@ sudo rm -f /var/log/libvirt/qemu/apex-iso-verify-console.log sudo virt-install -n apex-iso-verify -r 4096 --vcpus 4 --os-variant=rhel7 \ --accelerate -v --noautoconsole \ --disk path=/var/lib/libvirt/images/apex-iso-verify.qcow2,size=30,format=qcow2 \ - -l $BUILD_DIRECTORY/release/OPNFV-CentOS-7-x86_64-$OPNFV_ARTIFACT_VERSION.iso \ + -l /tmp/apex-iso/OPNFV-CentOS-7-x86_64-$OPNFV_ARTIFACT_VERSION.iso \ --extra-args 'console=ttyS0 console=ttyS0,115200n8 serial inst.ks=file:/iso-verify.ks inst.stage2=hd:LABEL=OPNFV\x20CentOS\x207\x20x86_64:/' \ - --initrd-inject $BUILD_DIRECTORY/../ci/iso-verify.ks \ + --initrd-inject ci/iso-verify.ks \ --serial file,path=/var/log/libvirt/qemu/apex-iso-verify-console.log echo "Waiting for install to finish..." diff --git a/jjb/apex/apex.yml b/jjb/apex/apex.yml index bed67f416..058f18a50 100644 --- a/jjb/apex/apex.yml +++ b/jjb/apex/apex.yml @@ -500,7 +500,8 @@ current-parameters: false predefined-parameters: | DEPLOY_SCENARIO=$DEPLOY_SCENARIO - FUNCTEST_SUITE_NAME=healthcheck + FUNCTEST_MODE=tier + FUNCTEST_TIER=healthcheck GERRIT_BRANCH=$GERRIT_BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER @@ -914,6 +915,11 @@ properties: - logrotate-default + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-daily.*' triggers: - 'apex-{stream}' diff --git a/jjb/apex/apex.yml.j2 b/jjb/apex/apex.yml.j2 index 3c36e8f62..09c2f8cf4 100644 --- a/jjb/apex/apex.yml.j2 +++ b/jjb/apex/apex.yml.j2 @@ -370,7 +370,8 @@ current-parameters: false predefined-parameters: | DEPLOY_SCENARIO=$DEPLOY_SCENARIO - FUNCTEST_SUITE_NAME=healthcheck + FUNCTEST_MODE=tier + FUNCTEST_TIER=healthcheck GERRIT_BRANCH=$GERRIT_BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER @@ -784,6 +785,11 @@ properties: - logrotate-default + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-daily.*' triggers: - 'apex-{stream}' diff --git a/jjb/ci_gate_security/anteater-security-audit.sh b/jjb/ci_gate_security/anteater-security-audit.sh index 35f9354e0..8a170b044 100644 --- a/jjb/ci_gate_security/anteater-security-audit.sh +++ b/jjb/ci_gate_security/anteater-security-audit.sh @@ -2,6 +2,8 @@ cd $WORKSPACE REPORTDIR='.reports' mkdir -p $REPORTDIR +# Ensure any user can read the reports directory +chmod 777 $REPORTDIR echo "Generating patchset file to list changed files" git diff HEAD^1 --name-only | sed "s#^#/home/opnfv/anteater/$PROJECT/#" > $WORKSPACE/patchset echo "Changed files are" diff --git a/jjb/ci_gate_security/opnfv-ci-gate-security.yml b/jjb/ci_gate_security/opnfv-ci-gate-security.yml index 33179537c..e09339a4b 100644 --- a/jjb/ci_gate_security/opnfv-ci-gate-security.yml +++ b/jjb/ci_gate_security/opnfv-ci-gate-security.yml @@ -50,7 +50,7 @@ parameters: - label: name: SLAVE_LABEL - default: 'ericsson-build3' + default: 'opnfv-build' description: 'Slave label on Jenkins' - project-parameter: project: $GERRIT_PROJECT diff --git a/jjb/compass4nfv/compass-ci-jobs.yml b/jjb/compass4nfv/compass-ci-jobs.yml index 9f266b00c..74a134eda 100644 --- a/jjb/compass4nfv/compass-ci-jobs.yml +++ b/jjb/compass4nfv/compass-ci-jobs.yml @@ -16,7 +16,7 @@ euphrates: &euphrates stream: euphrates branch: 'stable/{stream}' - disabled: true + disabled: false gs-pathname: '/{stream}' ppa-pathname: '/{stream}' openstack-version: ocata @@ -629,23 +629,23 @@ - trigger: name: 'compass-os-nosdn-nofeature-ha-baremetal-euphrates-trigger' triggers: - - timed: '' #'0 9 * * *' + - timed: '0 1 * * *' - trigger: name: 'compass-os-nosdn-openo-ha-baremetal-euphrates-trigger' triggers: - - timed: '' #'0 13 * * *' + - timed: '' - trigger: name: 'compass-os-odl_l2-nofeature-ha-baremetal-euphrates-trigger' triggers: - - timed: '' #'0 17 * * *' + - timed: '' - trigger: name: 'compass-os-odl_l3-nofeature-ha-baremetal-euphrates-trigger' triggers: - - timed: '' #'0 21 * * *' + - timed: '0 21 * * *' - trigger: name: 'compass-os-onos-nofeature-ha-baremetal-euphrates-trigger' triggers: - - timed: '' #'0 1 * * *' + - timed: '' - trigger: name: 'compass-os-ocl-nofeature-ha-baremetal-euphrates-trigger' triggers: @@ -653,19 +653,19 @@ - trigger: name: 'compass-os-onos-sfc-ha-baremetal-euphrates-trigger' triggers: - - timed: '' #'0 5 * * *' + - timed: '' - trigger: name: 'compass-os-odl_l2-moon-ha-baremetal-euphrates-trigger' triggers: - - timed: '' + - timed: '0 5 * * *' - trigger: name: 'compass-os-nosdn-kvm-ha-baremetal-euphrates-trigger' triggers: - - timed: '' + - timed: '0 13 * * *' - trigger: name: 'compass-os-nosdn-dpdk-ha-baremetal-euphrates-trigger' triggers: - - timed: '' + - timed: '0 9 * * *' - trigger: name: 'compass-k8-nosdn-nofeature-ha-baremetal-euphrates-trigger' triggers: @@ -673,7 +673,7 @@ - trigger: name: 'compass-os-odl-sfc-ha-baremetal-euphrates-trigger' triggers: - - timed: '' + - timed: '0 17 * * *' #---------------------- # noha-baremetal-euphrates @@ -737,7 +737,7 @@ - trigger: name: 'compass-os-odl_l2-moon-ha-virtual-master-trigger' triggers: - - timed: '0 12 * * *' + - timed: '30 12 * * *' - trigger: name: 'compass-os-nosdn-kvm-ha-virtual-master-trigger' triggers: @@ -761,7 +761,7 @@ - trigger: name: 'compass-os-nosdn-kvm-noha-virtual-master-trigger' triggers: - - timed: '0 13 * * *' + - timed: '30 13 * * *' - trigger: name: 'compass-os-nosdn-nofeature-noha-virtual-master-trigger' triggers: @@ -789,23 +789,23 @@ - trigger: name: 'compass-os-nosdn-nofeature-ha-virtual-euphrates-trigger' triggers: - - timed: '' #'0 21 * * *' + - timed: '0 23 * * *' - trigger: name: 'compass-os-nosdn-openo-ha-virtual-euphrates-trigger' triggers: - - timed: '' #'0 22 * * *' + - timed: '' - trigger: name: 'compass-os-odl_l2-nofeature-ha-virtual-euphrates-trigger' triggers: - - timed: '' #'0 20 * * *' + - timed: '' - trigger: name: 'compass-os-odl_l3-nofeature-ha-virtual-euphrates-trigger' triggers: - - timed: '' #'0 19 * * *' + - timed: '0 22 * * *' - trigger: name: 'compass-os-onos-nofeature-ha-virtual-euphrates-trigger' triggers: - - timed: '' #'0 18 * * *' + - timed: '' - trigger: name: 'compass-os-ocl-nofeature-ha-virtual-euphrates-trigger' triggers: @@ -813,27 +813,27 @@ - trigger: name: 'compass-os-onos-sfc-ha-virtual-euphrates-trigger' triggers: - - timed: '' #'0 15 * * *' + - timed: '' - trigger: name: 'compass-os-odl_l2-moon-ha-virtual-euphrates-trigger' triggers: - - timed: '' #'0 14 * * *' + - timed: '0 20 * * *' - trigger: name: 'compass-os-nosdn-kvm-ha-virtual-euphrates-trigger' triggers: - - timed: '' + - timed: '0 16 * * *' - trigger: name: 'compass-os-nosdn-dpdk-ha-virtual-euphrates-trigger' triggers: - - timed: '' + - timed: '0 14 * * *' - trigger: name: 'compass-os-odl-sfc-ha-virtual-euphrates-trigger' triggers: - - timed: '' + - timed: '0 18 * * *' - trigger: name: 'compass-k8-nosdn-nofeature-ha-virtual-euphrates-trigger' triggers: - - timed: '' + - timed: '0 13 * * *' #-------------------- # noha-virtual-euphrates @@ -841,24 +841,24 @@ - trigger: name: 'compass-os-nosdn-kvm-noha-virtual-euphrates-trigger' triggers: - - timed: '' + - timed: '0 15 * * *' - trigger: name: 'compass-os-nosdn-nofeature-noha-virtual-euphrates-trigger' triggers: - - timed: '' + - timed: '0 17 * * *' - trigger: name: 'compass-os-odl_l3-nofeature-noha-virtual-euphrates-trigger' triggers: - - timed: '' + - timed: '0 23 * * *' - trigger: name: 'compass-os-odl_l2-moon-noha-virtual-euphrates-trigger' triggers: - - timed: '' + - timed: '0 21 * * *' - trigger: name: 'compass-os-odl-sfc-noha-virtual-euphrates-trigger' triggers: - - timed: '' + - timed: '0 19 * * *' - trigger: name: 'compass-os-nosdn-dpdk-noha-virtual-euphrates-trigger' triggers: - - timed: '' + - timed: '0 12 * * *' diff --git a/jjb/compass4nfv/compass-project-jobs.yml b/jjb/compass4nfv/compass-project-jobs.yml index e612ef65f..fe9170578 100644 --- a/jjb/compass4nfv/compass-project-jobs.yml +++ b/jjb/compass4nfv/compass-project-jobs.yml @@ -19,6 +19,11 @@ gs-pathname: '/{stream}' ppa-pathname: '/{stream}' disabled: false + - euphrates: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + ppa-pathname: '/{stream}' + disabled: false jobs: - '{installer}-build-daily-{stream}' diff --git a/jjb/compass4nfv/compass-verify-jobs.yml b/jjb/compass4nfv/compass-verify-jobs.yml index ee91e02da..f4fe8f66c 100644 --- a/jjb/compass4nfv/compass-verify-jobs.yml +++ b/jjb/compass4nfv/compass-verify-jobs.yml @@ -159,7 +159,8 @@ - name: 'functest-compass-virtual-suite-{stream}' current-parameters: false predefined-parameters: | - FUNCTEST_SUITE_NAME=healthcheck + FUNCTEST_MODE=tier + FUNCTEST_TIER=healthcheck DEPLOY_SCENARIO=os-nosdn-nofeature-ha node-parameters: true kill-phase-on: NEVER @@ -167,6 +168,7 @@ - name: 'functest-compass-virtual-suite-{stream}' current-parameters: false predefined-parameters: | + FUNCTEST_MODE=testcase FUNCTEST_SUITE_NAME=vping_ssh DEPLOY_SCENARIO=os-nosdn-nofeature-ha node-parameters: true diff --git a/jjb/doctor/doctor.yml b/jjb/doctor/doctor.yml index 012d37398..c80642979 100644 --- a/jjb/doctor/doctor.yml +++ b/jjb/doctor/doctor.yml @@ -143,6 +143,9 @@ description: 'Scenario to deploy and test' # functest-suite-parameter - string: + name: FUNCTEST_MODE + default: 'testcase' + - string: name: FUNCTEST_SUITE_NAME default: 'doctor-notification' - string: diff --git a/jjb/dovetail/dovetail-ci-jobs.yml b/jjb/dovetail/dovetail-ci-jobs.yml index 4c3d72fb5..1474803e9 100644 --- a/jjb/dovetail/dovetail-ci-jobs.yml +++ b/jjb/dovetail/dovetail-ci-jobs.yml @@ -167,6 +167,11 @@ SUT: apex auto-trigger-name: 'daily-trigger-disabled' <<: *danube + - huawei-pod7: + slave-label: huawei-pod7 + SUT: compass + auto-trigger-name: 'daily-trigger-disabled' + <<: *danube #-------------------------------- testsuite: - 'compliance_set' diff --git a/jjb/fuel/fuel-deploy.sh b/jjb/fuel/fuel-deploy.sh index d44c060ac..be4560493 100755 --- a/jjb/fuel/fuel-deploy.sh +++ b/jjb/fuel/fuel-deploy.sh @@ -103,7 +103,7 @@ echo "--------------------------------------------------------" echo "Scenario: ${DEPLOY_SCENARIO}" echo "Lab: ${LAB_NAME}" echo "POD: ${POD_NAME}" -[[ "${BRANCH}" != 'master' ]] && echo "ISO: ${OPNFV_ARTIFACT_URL/*\/}" +[[ "${BRANCH}" =~ 'danube' ]] && echo "ISO: ${OPNFV_ARTIFACT_URL/*\/}" echo echo "Starting the deployment using ${INSTALLER_TYPE}. This could take some time..." echo "--------------------------------------------------------" diff --git a/jjb/functest/functest-alpine.sh b/jjb/functest/functest-alpine.sh index c9484304f..38dcf016d 100755 --- a/jjb/functest/functest-alpine.sh +++ b/jjb/functest/functest-alpine.sh @@ -4,6 +4,60 @@ set -e set +u set +o pipefail +run_tiers() { + cmd_opt='prepare_env start && run_tests -r -t all' + ret_val_file="${HOME}/opnfv/functest/results/${BRANCH##*/}/return_value" + echo 0 > ${ret_val_file} + + for tier in ${tiers[@]}; do + FUNCTEST_IMAGE=opnfv/functest-${tier} + echo "Functest: Pulling Functest Docker image ${FUNCTEST_IMAGE} ..." + docker pull ${FUNCTEST_IMAGE}>/dev/null + cmd="docker run --privileged=true ${envs} ${volumes} ${FUNCTEST_IMAGE} /bin/bash -c '${cmd_opt}'" + echo "Running Functest tier '${tier}'. CMD: ${cmd}" + eval ${cmd} + ret_value=$? + if [ ${ret_value} != 0 ]; then + echo ${ret_value} > ${ret_val_file} + fi + done +} + +run_test() { + test_name=$1 + cmd_opt='prepare_env start && run_tests -r -t $test_name' + ret_val_file="${HOME}/opnfv/functest/results/${BRANCH##*/}/return_value" + echo 0 > ${ret_val_file} + # Determine which Functest image should be used for the test case + case ${test_name} in + connection_check|api_check|snaps_health_check) + FUNCTEST_IMAGE=opnfv/functest-healthcheck + vping_ssh|vping_userdata|tempest_smoke_serial|rally_sanity|refstack_defcore|odl|odl_netvirt|fds|snaps_smoke) + FUNCTEST_IMAGE=opnfv/functest-smoke + tempest_full_parallel|tempest_custom|rally_full) + FUNCTEST_IMAGE=opnfv/functest-components + cloudify_ims|orchestra_openims|orchestra_clearwaterims|vyos_vrouter) + FUNCTEST_IMAGE=opnfv/functest-vnf + promise|doctor-notification|bgpvpn|functest-odl-sfc|domino-multinode|barometercollectd) + FUNCTEST_IMAGE=opnfv/functest-features + parser) + FUNCTEST_IMAGE=opnfv/functest-parser + *) + echo "Unkown test case $test_name" + exit 1 + esac + echo "Functest: Pulling Functest Docker image ${FUNCTEST_IMAGE} ..." + docker pull ${FUNCTEST_IMAGE}>/dev/null + cmd="docker run --privileged=true ${envs} ${volumes} ${FUNCTEST_IMAGE} /bin/bash -c '${cmd_opt}'" + echo "Running Functest test case '${test_name}'. CMD: ${cmd}" + eval ${cmd} + ret_value=$? + if [ ${ret_value} != 0 ]; then + echo ${ret_value} > ${ret_val_file} + fi +} + + [[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null" FUNCTEST_DIR=/home/opnfv/functest DEPLOY_TYPE=baremetal @@ -75,29 +129,17 @@ volumes="${images_vol} ${results_vol} ${sshkey_vol} ${rc_file_vol} ${cacert_file set +e -if [ ${FUNCTEST_SUITE_NAME} == 'healthcheck' ]; then - tiers=(healthcheck) + +if [ ${FUNCTEST_MODE} == 'testcase' ]; then + run_test ${FUNCTEST_SUITE_NAME} +elif [ ${FUNCTEST_MODE} == 'tier' ]; then + tiers= (${FUNCTEST_TIER}) + run_tiers ${tiers} else if [ ${DEPLOY_TYPE} == 'baremetal' ]; then tiers=(healthcheck smoke features vnf parser) else tiers=(healthcheck smoke features) fi + run_tiers ${tiers} fi - -cmd_opt='prepare_env start && run_tests -r -t all' -ret_val_file="${HOME}/opnfv/functest/results/${BRANCH##*/}/return_value" -echo 0 > ${ret_val_file} - -for tier in ${tiers[@]}; do - FUNCTEST_IMAGE=opnfv/functest-${tier} - echo "Functest: Pulling Functest Docker image ${FUNCTEST_IMAGE} ..." - docker pull ${FUNCTEST_IMAGE}>/dev/null - cmd="docker run --privileged=true ${envs} ${volumes} ${FUNCTEST_IMAGE} /bin/bash -c '${cmd_opt}'" - echo "Running Functest tier '${tier}'. CMD: ${cmd}" - eval ${cmd} - ret_value=$? - if [ ${ret_value} != 0 ]; then - echo ${ret_value} > ${ret_val_file} - fi -done diff --git a/jjb/functest/functest-daily-jobs.yml b/jjb/functest/functest-daily-jobs.yml index ea39de44b..5a99fdce8 100644 --- a/jjb/functest/functest-daily-jobs.yml +++ b/jjb/functest/functest-daily-jobs.yml @@ -297,20 +297,27 @@ name: functest-daily-parameter parameters: - string: - name: FUNCTEST_SUITE_NAME + name: FUNCTEST_MODE default: 'daily' description: "Daily suite name to run" - parameter: name: functest-arm-daily-parameter parameters: - string: - name: FUNCTEST_SUITE_NAME + name: FUNCTEST_MODE default: 'arm-daily' description: "Daily suite name (Aarch64) to run" - parameter: name: functest-suite-parameter parameters: - choice: + name: FUNCTEST_MODE + choices: + - 'tier' + - 'testcase' + default: 'tier' + description: "Test case or Tier to be run" + - choice: name: FUNCTEST_SUITE_NAME choices: - 'connection_check' @@ -336,6 +343,16 @@ - 'cloudify_vrouter' - 'orchestra_openims' - 'orchestra_clearwaterims' + default: 'connection_check' + - choice: + name: FUNCTEST_TIER + choices: + - 'healthcheck' + - 'smoke' + - 'features' + - 'components' + - 'vnf' + default: 'healthcheck' - string: name: TESTCASE_OPTIONS default: '' @@ -409,6 +426,14 @@ - 'functest-store-results' - builder: + name: functest-alpine-suite-builder + builders: + - 'functest-cleanup' + - 'set-functest-env-alpine' + - 'functest-suite' + - 'functest-store-results' + +- builder: name: functest-daily builders: - shell: @@ -427,7 +452,10 @@ name: functest-suite builders: - shell: - !include-raw: ./functest-suite.sh + !include-raw: + - ./functest-env-presetup.sh + - ../../utils/fetch_os_creds.sh + - ./functest-alpine.sh - builder: name: set-functest-env diff --git a/jjb/kvmfornfv/kvmfornfv.yml b/jjb/kvmfornfv/kvmfornfv.yml index ad497e97d..2055da969 100644 --- a/jjb/kvmfornfv/kvmfornfv.yml +++ b/jjb/kvmfornfv/kvmfornfv.yml @@ -8,19 +8,19 @@ - master: branch: '{stream}' gs-pathname: '' - disabled: false - euphrates: branch: 'stable/{stream}' gs-pathname: '/{stream}' - disabled: true ##################################### # patch verification phases ##################################### phase: - 'build': slave-label: 'opnfv-build-ubuntu' + disabled: false - 'test': slave-label: 'intel-pod10' + disabled: true ##################################### # patch verification phases ##################################### diff --git a/jjb/opera/opera-daily-jobs.yml b/jjb/opera/opera-daily-jobs.yml index d0dd0525a..5d7526bba 100644 --- a/jjb/opera/opera-daily-jobs.yml +++ b/jjb/opera/opera-daily-jobs.yml @@ -92,6 +92,7 @@ current-parameters: false predefined-parameters: | DEPLOY_SCENARIO=os-nosdn-openo-ha + FUNCTEST_MODE=testcase FUNCTEST_SUITE_NAME=opera_vims node-parameters: true kill-phase-on: NEVER diff --git a/jjb/orchestra/orchestra-daily-jobs.yml b/jjb/orchestra/orchestra-daily-jobs.yml index 74c997cad..7c2deaec4 100644 --- a/jjb/orchestra/orchestra-daily-jobs.yml +++ b/jjb/orchestra/orchestra-daily-jobs.yml @@ -93,6 +93,7 @@ current-parameters: false predefined-parameters: | DEPLOY_SCENARIO=os-nosdn-openbaton-ha + FUNCTEST_MODE=testcase FUNCTEST_SUITE_NAME=orchestra_ims node-parameters: true kill-phase-on: NEVER diff --git a/jjb/ovn4nfv/ovn4nfv-daily-jobs.yml b/jjb/ovn4nfv/ovn4nfv-daily-jobs.yml index a4c5865c0..ca4cfeede 100644 --- a/jjb/ovn4nfv/ovn4nfv-daily-jobs.yml +++ b/jjb/ovn4nfv/ovn4nfv-daily-jobs.yml @@ -81,6 +81,7 @@ current-parameters: false predefined-parameters: | DEPLOY_SCENARIO=os-ovn-nofeature-ha + FUNCTEST_MODE=testcase FUNCTEST_SUITE_NAME=ovn4nfv_test_suite node-parameters: true kill-phase-on: NEVER diff --git a/jjb/releng/opnfv-docker.yml b/jjb/releng/opnfv-docker.yml index 3b506bb54..714d8cfb1 100644 --- a/jjb/releng/opnfv-docker.yml +++ b/jjb/releng/opnfv-docker.yml @@ -118,6 +118,46 @@ project: 'functest' <<: *euphrates <<: *functest-receivers + - 'functest-core': + project: 'functest' + dockerdir: 'docker/core' + <<: *euphrates + <<: *functest-receivers + - 'functest-healthcheck': + project: 'functest' + dockerdir: 'docker/healthcheck' + <<: *euphrates + <<: *functest-receivers + - 'functest-smoke': + project: 'functest' + dockerdir: 'docker/smoke' + <<: *euphrates + <<: *functest-receivers + - 'functest-features': + project: 'functest' + dockerdir: 'docker/features' + <<: *euphrates + <<: *functest-receivers + - 'functest-components': + project: 'functest' + dockerdir: 'docker/components' + <<: *euphrates + <<: *functest-receivers + - 'functest-vnf': + project: 'functest' + dockerdir: 'docker/vnf' + <<: *euphrates + <<: *functest-receivers + - 'functest-parser': + project: 'functest' + dockerdir: 'docker/parser' + <<: *euphrates + <<: *functest-receivers + - 'functest-restapi': + project: 'functest' + dockerdir: 'docker/restapi' + <<: *euphrates + <<: *functest-receivers - 'storperf-master': project: 'storperf' dockerdir: 'docker/storperf-master' @@ -148,6 +188,10 @@ arch_tag: 'x86_64' <<: *euphrates <<: *storperf-receivers + - 'nfvbench': + project: 'nfvbench' + <<: *euphrates + <<: *other-receivers jobs: - "{dockerrepo}-docker-build-push-{stream}" diff --git a/jjb/xci/osa-periodic-jobs.yml b/jjb/xci/osa-periodic-jobs.yml index 86910ac4f..048825e74 100644 --- a/jjb/xci/osa-periodic-jobs.yml +++ b/jjb/xci/osa-periodic-jobs.yml @@ -106,7 +106,8 @@ predefined-parameters: | DISTRO={distro} DEPLOY_SCENARIO=os-nosdn-nofeature-noha - FUNCTEST_SUITE_NAME=healthcheck + FUNCTEST_MODE=tier + FUNCTEST_TIER=healthcheck node-parameters: true kill-phase-on: NEVER abort-all-job: false @@ -159,6 +160,9 @@ name: OPNFV_RELENG_DEV_PATH default: $WORKSPACE/releng-xci - string: + name: FUNCTEST_MODE + default: 'tier' + - string: name: FUNCTEST_SUITE_NAME default: 'healthcheck' - string: diff --git a/jjb/xci/xci-daily-jobs.yml b/jjb/xci/xci-daily-jobs.yml index 64659da40..7d95429da 100644 --- a/jjb/xci/xci-daily-jobs.yml +++ b/jjb/xci/xci-daily-jobs.yml @@ -215,6 +215,9 @@ name: INSTALLER_TYPE default: 'osa' - string: + name: FUNCTEST_MODE + default: 'daily' + - string: name: FUNCTEST_SUITE_NAME default: 'daily' description: "Daily suite name to run" diff --git a/jjb/xci/xci-verify-jobs.yml b/jjb/xci/xci-verify-jobs.yml index 324bfd14c..440fac79f 100644 --- a/jjb/xci/xci-verify-jobs.yml +++ b/jjb/xci/xci-verify-jobs.yml @@ -145,7 +145,8 @@ DISTRO={distro} DEPLOY_SCENARIO=os-nosdn-nofeature-noha CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES - FUNCTEST_SUITE_NAME=healthcheck + FUNCTEST_MODE=tier + FUNCTEST_TIER=healthcheck node-parameters: true kill-phase-on: NEVER abort-all-job: true @@ -178,6 +179,9 @@ name: DEPLOY_SCENARIO default: 'os-nosdn-nofeature-noha' - string: + name: FUNCTEST_MODE + default: 'tier' + - string: name: FUNCTEST_SUITE_NAME default: 'healthcheck' - string: diff --git a/utils/test/testapi/tools/watchdog/docker_watch.sh b/utils/test/opts/watchdog.sh index f1d8946b6..51868d709 100644 --- a/utils/test/testapi/tools/watchdog/docker_watch.sh +++ b/utils/test/opts/watchdog.sh @@ -27,7 +27,7 @@ declare -A urls=( ["testapi"]="http://testresults.opnfv.org/test/" \ ### Functions related to checking. function is_deploying() { - xml=$(curl -m10 "https://build.opnfv.org/ci/job/${1}-automate-master/lastBuild/api/xml?depth=1") + xml=$(curl -m10 "https://build.opnfv.org/ci/job/${1}-automate-docker-deploy-master/lastBuild/api/xml?depth=1") building=$(grep -oPm1 "(?<=<building>)[^<]+" <<< "$xml") if [[ $building == "false" ]] then @@ -64,12 +64,11 @@ function check_modules() { failed_modules=() for module in "${modules[@]}" do - if is_deploying $module; then - continue - fi if ! check_connectivity $module "${urls[$module]}"; then - echo -e "$module failed" - failed_modules+=($module) + if ! is_deploying $module; then + echo -e "$module failed" + failed_modules+=($module) + fi fi done if [ ! -z "$failed_modules" ]; then @@ -114,13 +113,11 @@ function start_containers_fix() { function start_container_fix() { echo -e "Starting a container $module" - sudo docker stop $module - sudo docker start $module + sudo docker restart $module sleep 5 if ! check_connectivity $module "${urls[$module]}"; then echo -e "Starting an old container $module_old" - sudo docker stop $module - sudo docker start $module"_old" + sudo docker restart $module"_old" sleep 5 fi } diff --git a/utils/test/reporting/docker/nginx.conf b/utils/test/reporting/docker/nginx.conf index 95baf0e48..66bd7e497 100644 --- a/utils/test/reporting/docker/nginx.conf +++ b/utils/test/reporting/docker/nginx.conf @@ -15,7 +15,7 @@ server { } location /api/ { - http_pass http://backends/; + proxy_pass http://backends/; } location /display/ { diff --git a/utils/test/testapi/deployment/deploy.py b/utils/test/testapi/deployment/deploy.py deleted file mode 100644 index 6433fa6b2..000000000 --- a/utils/test/testapi/deployment/deploy.py +++ /dev/null @@ -1,40 +0,0 @@ -import argparse -import os - -from jinja2 import Environment, FileSystemLoader - -env = Environment(loader=FileSystemLoader('./')) -docker_compose_yml = './docker-compose.yml' -docker_compose_template = './docker-compose.yml.template' - - -def render_docker_compose(port, base_url): - vars = { - "expose_port": port, - "base_url": base_url, - } - template = env.get_template(docker_compose_template) - yml = template.render(vars=vars) - - with open(docker_compose_yml, 'w') as f: - f.write(yml) - f.close() - - -def main(args): - render_docker_compose(args.expose_port, args.base_url) - os.system('docker-compose -f {} up -d'.format(docker_compose_yml)) - - -if __name__ == '__main__': - parser = argparse.ArgumentParser(description='Backup MongoDBs') - parser.add_argument('-p', '--expose-port', - type=int, - required=False, - default=8000, - help='testapi exposed port') - parser.add_argument('-l', '--base-url', - type=str, - required=True, - help='testapi exposed base-url') - main(parser.parse_args()) diff --git a/utils/test/testapi/deployment/docker-compose.yml.template b/utils/test/testapi/deployment/docker-compose.yml.template deleted file mode 100644 index cd684048e..000000000 --- a/utils/test/testapi/deployment/docker-compose.yml.template +++ /dev/null @@ -1,15 +0,0 @@ -version: '2' -services: - mongo: - image: mongo:3.2.1 - container_name: opnfv-mongo - testapi: - image: opnfv/testapi:latest - container_name: opnfv-testapi - environment: - - mongodb_url=mongodb://mongo:27017/ - - base_url={{ vars.base_url }} - ports: - - "{{ vars.expose_port }}:8000" - links: - - mongo diff --git a/utils/test/testapi/opts/deploy.py b/utils/test/testapi/opts/deploy.py new file mode 100644 index 000000000..f58690c5d --- /dev/null +++ b/utils/test/testapi/opts/deploy.py @@ -0,0 +1,55 @@ +import argparse +import os + +from jinja2 import Environment + +DOCKER_COMPOSE_FILE = './docker-compose.yml' +DOCKER_COMPOSE_TEMPLATE = """ +version: '2' +services: + mongo: + image: mongo:3.2.1 + container_name: opnfv-mongo + testapi: + image: opnfv/testapi:latest + container_name: opnfv-testapi + environment: + - mongodb_url=mongodb://mongo:27017/ + - base_url={{ vars.testapi_base_url }} + ports: + - "{{ vars.testapi_port }}:8000" + links: + - mongo +""" + + +def render_docker_compose(testapi_port, testapi_base_url): + vars = { + "testapi_port": testapi_port, + "testapi_base_url": testapi_base_url, + } + + yml = Environment().from_string(DOCKER_COMPOSE_TEMPLATE).render(vars=vars) + + with open(DOCKER_COMPOSE_FILE, 'w') as f: + f.write(yml) + f.close() + + +def main(args): + render_docker_compose(args.testapi_port, args.testapi_base_url) + os.system('docker-compose -f {} up -d'.format(DOCKER_COMPOSE_FILE)) + + +if __name__ == '__main__': + parser = argparse.ArgumentParser(description='Backup MongoDBs') + parser.add_argument('-tp', '--testapi-port', + type=int, + required=False, + default=8000, + help='testapi exposed port') + parser.add_argument('-tl', '--testapi-base-url', + type=str, + required=True, + help='testapi exposed base-url') + main(parser.parse_args()) |