diff options
-rwxr-xr-x | jjb/apex/apex-download-artifact.sh | 11 | ||||
-rw-r--r-- | jjb/apex/apex.yml | 3 | ||||
-rw-r--r-- | jjb/apex/apex.yml.j2 | 38 | ||||
-rw-r--r-- | jjb/armband/armband-ci-jobs.yml | 33 | ||||
-rw-r--r-- | jjb/barometer/barometer.yml | 16 | ||||
-rw-r--r-- | jjb/functest/functest-daily-jobs.yml | 7 | ||||
-rwxr-xr-x | jjb/functest/functest-env-presetup.sh | 31 | ||||
-rw-r--r-- | jjb/functest/functest-weekly-jobs.yml | 5 | ||||
-rwxr-xr-x | jjb/functest/set-functest-env.sh | 64 | ||||
-rwxr-xr-x | utils/fetch_os_creds.sh | 10 | ||||
-rw-r--r-- | utils/push-test-logs.sh | 1 |
11 files changed, 97 insertions, 122 deletions
diff --git a/jjb/apex/apex-download-artifact.sh b/jjb/apex/apex-download-artifact.sh index f25325129..2d39e98b0 100755 --- a/jjb/apex/apex-download-artifact.sh +++ b/jjb/apex/apex-download-artifact.sh @@ -23,7 +23,7 @@ if [[ "$ARTIFACT_VERSION" =~ dev ]]; then tar -xvf apex-${OPNFV_ARTIFACT_VERSION}.tar.gz popd > /dev/null else - echo "Will download RPMs and ISO..." + echo "Will download RPMs..." # Must be RPMs/ISO export OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d") @@ -56,15 +56,6 @@ else echo "Unable to install new RPMs: $RPM_LIST" exit 1 fi - - # log info to console - echo "Downloading the ISO artifact using URL http://$OPNFV_ARTIFACT_URL" - echo "--------------------------------------------------------" - echo - - # Download ISO - curl --fail -s -o $BUILD_DIRECTORY/apex.iso http://$OPNFV_ARTIFACT_URL > gsutil.iso.log 2>&1 - fi # TODO: Uncomment these lines to verify SHA512SUMs once the sums are diff --git a/jjb/apex/apex.yml b/jjb/apex/apex.yml index 861b713a0..ae2186002 100644 --- a/jjb/apex/apex.yml +++ b/jjb/apex/apex.yml @@ -593,6 +593,9 @@ current-parameters: true predefined-parameters: | OPNFV_CLEAN=yes + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC= + DEPLOY_SCENARIO=$DEPLOY_SCENARIO kill-phase-on: FAILURE abort-all-job: true git-revision: false diff --git a/jjb/apex/apex.yml.j2 b/jjb/apex/apex.yml.j2 index 1df6e154c..3f10e214b 100644 --- a/jjb/apex/apex.yml.j2 +++ b/jjb/apex/apex.yml.j2 @@ -593,6 +593,9 @@ current-parameters: true predefined-parameters: | OPNFV_CLEAN=yes + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC= + DEPLOY_SCENARIO=$DEPLOY_SCENARIO kill-phase-on: FAILURE abort-all-job: true git-revision: false @@ -929,30 +932,6 @@ abort-all-job: true git-revision: false -- job-template: - name: 'apex-gs-clean-{stream}' - - # Job template for clean - # - # Required Variables: - # stream: branch with - in place of / (eg. stable) - node: '{slave}' - - disabled: false - - parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - apex-parameter: - gs-pathname: '{gs-pathname}' - - builders: - - 'apex-gs-clean' - - triggers: - - 'apex-gs-clean-{stream}' - ######################## # parameter macros ######################## @@ -1029,12 +1008,6 @@ !include-raw: ./apex-download-artifact.sh - builder: - name: 'apex-gs-cleanup' - builders: - - shell: - !include-raw: ./apex-gs-cleanup.sh - -- builder: name: 'apex-deploy' builders: - shell: @@ -1051,7 +1024,4 @@ name: 'apex-danube' triggers: - timed: '0 12 * * *' -- trigger: - name: 'apex-gs-clean-{stream}' - triggers: - - timed: '0 2 * * *' + diff --git a/jjb/armband/armband-ci-jobs.yml b/jjb/armband/armband-ci-jobs.yml index 17d520419..1531ff144 100644 --- a/jjb/armband/armband-ci-jobs.yml +++ b/jjb/armband/armband-ci-jobs.yml @@ -182,23 +182,28 @@ build-step-failure-threshold: 'never' failure-threshold: 'never' unstable-threshold: 'FAILURE' - # 1.dovetail only master by now, not sync with A/B/C branches + # 1.dovetail only master, based on D release # 2.here the stream means the SUT stream, dovetail stream is defined in its own job - # 3.only debug testsuite here(includes 3 basic testcase, - # i.e. one tempest smoke ipv6, two vping from functest) + # 3.only proposed_tests testsuite here(refstack, ha, ipv6, bgpvpn) # 4.not used for release criteria or compliance, # only to debug the dovetail tool bugs with arm pods - - trigger-builds: - - project: 'dovetail-{installer}-{pod}-proposed_tests-{stream}' - current-parameters: false - predefined-parameters: - DEPLOY_SCENARIO={scenario} - block: true - same-node: true - block-thresholds: - build-step-failure-threshold: 'never' - failure-threshold: 'never' - unstable-threshold: 'FAILURE' + # 5.only run against scenario os-(nosdn|odl_l2)-(nofeature-bgpvpn)-ha + - conditional-step: + condition-kind: regex-match + regex: os-(nosdn|odl_l2)-(nofeature|bgpvpn)-ha + label: '{scenario}' + steps: + - trigger-builds: + - project: 'dovetail-{installer}-{pod}-proposed_tests-{stream}' + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO={scenario} + block: true + same-node: true + block-thresholds: + build-step-failure-threshold: 'never' + failure-threshold: 'never' + unstable-threshold: 'FAILURE' - job-template: name: '{installer}-deploy-{pod}-daily-{stream}' diff --git a/jjb/barometer/barometer.yml b/jjb/barometer/barometer.yml index 9ec30e809..68b8a04c0 100644 --- a/jjb/barometer/barometer.yml +++ b/jjb/barometer/barometer.yml @@ -126,21 +126,16 @@ disabled: '{obj:disabled}' - concurrent: true + concurrent: false properties: - logrotate-default - - throttle: - enabled: true - max-total: 3 - max-per-node: 2 - option: 'project' parameters: - project-parameter: project: '{project}' branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' + - 'opnfv-build-centos-defaults' scm: - git-scm @@ -151,7 +146,6 @@ builders: - shell: | pwd - cd src - ./install_build_deps.sh - make clobber - make + cd ci + ./install_dependencies.sh + ./build_rpm.sh diff --git a/jjb/functest/functest-daily-jobs.yml b/jjb/functest/functest-daily-jobs.yml index b180f591b..8de092d29 100644 --- a/jjb/functest/functest-daily-jobs.yml +++ b/jjb/functest/functest-daily-jobs.yml @@ -356,6 +356,8 @@ - 'functest-cleanup' - 'set-functest-env' - 'functest-suite' + - 'functest-store-results' + - 'functest-exit' - builder: name: functest-daily @@ -374,7 +376,10 @@ name: set-functest-env builders: - shell: - !include-raw: ./set-functest-env.sh + !include-raw: + - ./functest-env-presetup.sh + - ../../utils/fetch_os_creds.sh + - ./set-functest-env.sh - builder: name: functest-store-results diff --git a/jjb/functest/functest-env-presetup.sh b/jjb/functest/functest-env-presetup.sh new file mode 100755 index 000000000..7a9b09d2c --- /dev/null +++ b/jjb/functest/functest-env-presetup.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash +set -o errexit +set -o nounset +set -o pipefail + +# Fetch INSTALLER_IP for APEX deployments +if [[ ${INSTALLER_TYPE} == 'apex' ]]; then + echo "Gathering IP information for Apex installer VM" + ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" + if sudo virsh list | grep undercloud; then + echo "Installer VM detected" + undercloud_mac=$(sudo virsh domiflist undercloud | grep default | \ + grep -Eo "[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+") + export INSTALLER_IP=$(/usr/sbin/arp -e | grep ${undercloud_mac} | awk {'print $1'}) + export sshkey_vol="-v /root/.ssh/id_rsa:/root/.ssh/id_rsa" + sudo scp $ssh_options root@${INSTALLER_IP}:/home/stack/stackrc ${HOME}/stackrc + export stackrc_vol="-v ${HOME}/stackrc:/home/opnfv/functest/conf/stackrc" + + if sudo iptables -C FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable 2> ${redirect}; then + sudo iptables -D FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable + fi + if sudo iptables -C FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable 2> ${redirect}; then + sudo iptables -D FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable + fi + echo "Installer ip is ${INSTALLER_IP}" + else + echo "No available installer VM exists and no credentials provided...exiting" + exit 1 + fi +fi + diff --git a/jjb/functest/functest-weekly-jobs.yml b/jjb/functest/functest-weekly-jobs.yml index f44f7b8aa..59d24cc87 100644 --- a/jjb/functest/functest-weekly-jobs.yml +++ b/jjb/functest/functest-weekly-jobs.yml @@ -115,7 +115,10 @@ - shell: !include-raw: ./functest-cleanup.sh - shell: - !include-raw: ./set-functest-env.sh + !include-raw: + - ./functest-env-presetup.sh + - ../../utils/fetch_os_creds.sh + - ./set-functest-env.sh - shell: !include-raw: ./functest-loop.sh - shell: diff --git a/jjb/functest/set-functest-env.sh b/jjb/functest/set-functest-env.sh index 89dabb056..558e2487d 100755 --- a/jjb/functest/set-functest-env.sh +++ b/jjb/functest/set-functest-env.sh @@ -1,50 +1,16 @@ #!/bin/bash set -e -[[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null" -# LAB_CONFIG is used only for joid +set +u +set +o pipefail +[[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null" +# Prepare OpenStack credentials volume if [[ ${INSTALLER_TYPE} == 'joid' ]]; then - # If production lab then creds may be retrieved dynamically - # creds are on the jumphost, always in the same folder rc_file_vol="-v $LAB_CONFIG/admin-openrc:/home/opnfv/functest/conf/openstack.creds" - # If dev lab, credentials may not be the default ones, just provide a path to put them into docker - # replace the default one by the customized one provided by jenkins config -fi - -if [[ ${RC_FILE_PATH} != '' ]] && [[ -f ${RC_FILE_PATH} ]] ; then - echo "Credentials file detected: ${RC_FILE_PATH}" - # volume if credentials file path is given to Functest - rc_file_vol="-v ${RC_FILE_PATH}:/home/opnfv/functest/conf/openstack.creds" - RC_FLAG=1 -fi - - -if [[ ${INSTALLER_TYPE} == 'apex' ]]; then - ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" - if sudo virsh list | grep undercloud; then - echo "Installer VM detected" - undercloud_mac=$(sudo virsh domiflist undercloud | grep default | \ - grep -Eo "[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+") - INSTALLER_IP=$(/usr/sbin/arp -e | grep ${undercloud_mac} | awk {'print $1'}) - sshkey_vol="-v /root/.ssh/id_rsa:/root/.ssh/id_rsa" - sudo scp $ssh_options root@${INSTALLER_IP}:/home/stack/stackrc ${HOME}/stackrc - stackrc_vol="-v ${HOME}/stackrc:/home/opnfv/functest/conf/stackrc" - - if sudo iptables -C FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable 2> ${redirect}; then - sudo iptables -D FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable - fi - if sudo iptables -C FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable 2> ${redirect}; then - sudo iptables -D FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable - fi - elif [[ "$RC_FLAG" == 1 ]]; then - echo "No available installer VM, but credentials provided...continuing" - else - echo "No available installer VM exists and no credentials provided...exiting" - exit 1 - fi - +else + rc_file_vol="-v ${HOME}/opnfv-openrc.sh:/home/opnfv/functest/conf/openstack.creds" fi @@ -58,11 +24,13 @@ DEPLOY_TYPE=baremetal echo "Functest: Start Docker and prepare environment" -echo "Functest: Download images that will be used by test cases" -images_dir="${HOME}/opnfv/functest/images" -chmod +x ${WORKSPACE}/functest/ci/download_images.sh -${WORKSPACE}/functest/ci/download_images.sh ${images_dir} -images_vol="-v ${images_dir}:/home/opnfv/functest/images" +if [ "$BRANCH" != 'stable/danube' ]; then + echo "Functest: Download images that will be used by test cases" + images_dir="${HOME}/opnfv/functest/images" + chmod +x ${WORKSPACE}/functest/ci/download_images.sh + ${WORKSPACE}/functest/ci/download_images.sh ${images_dir} 2> ${redirect} + images_vol="-v ${images_dir}:/home/opnfv/functest/images" +fi dir_result="${HOME}/opnfv/functest/results/${BRANCH##*/}" mkdir -p ${dir_result} @@ -85,7 +53,11 @@ if [[ ${INSTALLER_TYPE} == 'compass' && ${DEPLOY_SCENARIO} == *'os-nosdn-openo-h envs=${env}" -e OPENO_MSB_ENDPOINT=${openo_msb_endpoint}" fi -volumes="${images_vol} ${results_vol} ${sshkey_vol} ${stackrc_vol} ${rc_file_vol}" +if [ "$BRANCH" != 'stable/danube' ]; then + volumes="${images_vol} ${results_vol} ${sshkey_vol} ${stackrc_vol} ${rc_file_vol}" +else + volumes="${results_vol} ${sshkey_vol} ${stackrc_vol} ${rc_file_vol}" +fi HOST_ARCH=$(uname -m) FUNCTEST_IMAGE="opnfv/functest" diff --git a/utils/fetch_os_creds.sh b/utils/fetch_os_creds.sh index 6a382a56c..458bbda3b 100755 --- a/utils/fetch_os_creds.sh +++ b/utils/fetch_os_creds.sh @@ -7,7 +7,9 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## - +set -o errexit +set -o nounset +set -o pipefail usage() { echo "usage: $0 [-v] -d <destination> -i <installer_type> -a <installer_ip>" >&2 @@ -157,8 +159,8 @@ elif [ "$installer_type" == "compass" ]; then sshpass -p root scp 2>/dev/null $ssh_options root@${installer_ip}:~/admin-openrc.sh $dest_path &> /dev/null info "This file contains the mgmt keystone API, we need the public one for our rc file" - grep "OS_AUTH_URL.*v2" $dest_path > /dev/null 2>&1 - if [ $? -eq 0 ] ; then + + if grep "OS_AUTH_URL.*v2" $dest_path > /dev/null 2>&1 ; then public_ip=$(sshpass -p root ssh $ssh_options root@${installer_ip} \ "ssh ${controller_ip} 'source /opt/admin-openrc.sh; openstack endpoint show identity '" \ | grep publicurl | awk '{print $4}') @@ -223,5 +225,3 @@ fi echo "-------- Credentials: --------" cat $dest_path - -exit 0 diff --git a/utils/push-test-logs.sh b/utils/push-test-logs.sh index 9099657c8..f0c488a5a 100644 --- a/utils/push-test-logs.sh +++ b/utils/push-test-logs.sh @@ -22,6 +22,7 @@ dir_result="${HOME}/opnfv/$project/results/${branch}" # + intel-pod12 (vsperf) node_list=(\ 'lf-pod1' 'lf-pod2' 'intel-pod2' 'intel-pod12' \ +'lf-virtual2' 'lf-virtual3' \ 'intel-pod5' 'intel-pod6' 'intel-pod7' 'intel-pod8' \ 'ericsson-pod1' 'ericsson-pod2' \ 'ericsson-virtual1' 'ericsson-virtual2' 'ericsson-virtual3' \ |