diff options
Diffstat (limited to 'jjb')
-rwxr-xr-x | jjb/apex/apex-fetch-logs.sh | 5 | ||||
-rw-r--r-- | jjb/parser/parser.yml | 4 | ||||
-rwxr-xr-x | jjb/xci/xci-run-functest.sh | 8 | ||||
-rwxr-xr-x | jjb/xci/xci-set-scenario.sh | 20 | ||||
-rw-r--r-- | jjb/yardstick/yardstick-daily-jobs.yml | 34 | ||||
-rw-r--r-- | jjb/yardstick/yardstick-project-jobs.yml | 25 |
6 files changed, 50 insertions, 46 deletions
diff --git a/jjb/apex/apex-fetch-logs.sh b/jjb/apex/apex-fetch-logs.sh index f25f456b1..bdb2252b3 100755 --- a/jjb/apex/apex-fetch-logs.sh +++ b/jjb/apex/apex-fetch-logs.sh @@ -14,9 +14,10 @@ if sudo opnfv-pyutil --fetch-logs; then echo "WARNING: Unable to determine log location. Logs will not be uploaded" exit 0 else + sudo chmod 777 ${LOG_LOCATION} UPLOAD_LOCATION="${GS_URL}/logs/${JOB_NAME}/${BUILD_NUMBER}/" - gsutil cp -r ${LOG_LOCATION} gs://${UPLOAD_LOCATION} > gsutil.latest_logs.log - echo "Logs available at https://${UPLOAD_LOCATION}/$(basename $LOG_LOCATION)" + gsutil -m cp -r ${LOG_LOCATION} gs://${UPLOAD_LOCATION} > gsutil.latest_logs.log + echo -e "Logs available at: \n$(find ${LOG_LOCATION} -type f | sed -n 's#^/tmp/#http://'$UPLOAD_LOCATION'#p')" fi else echo "WARNING: Log retrieval failed. No logs will be uploaded" diff --git a/jjb/parser/parser.yml b/jjb/parser/parser.yml index 87544196a..b711985bd 100644 --- a/jjb/parser/parser.yml +++ b/jjb/parser/parser.yml @@ -16,6 +16,10 @@ branch: '{stream}' gs-pathname: '' disabled: false + - fraser: &fraser + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false - euphrates: branch: 'stable/{stream}' gs-pathname: '/{stream}' diff --git a/jjb/xci/xci-run-functest.sh b/jjb/xci/xci-run-functest.sh index aa98e07aa..78b7d442c 100755 --- a/jjb/xci/xci-run-functest.sh +++ b/jjb/xci/xci-run-functest.sh @@ -55,12 +55,10 @@ export XCI_VENV=/home/devuser/releng-xci/venv ssh -F $HOME/.ssh/${DISTRO}-xci-vm-config ${DISTRO}_xci_vm "source $XCI_VENV/bin/activate; cd releng-xci/xci && ansible-playbook -i installer/osa/files/$XCI_FLAVOR/inventory playbooks/prepare-functest.yml" echo "Running functest" ssh -F $HOME/.ssh/${DISTRO}-xci-vm-config ${DISTRO}_xci_vm_opnfv "/root/run-functest.sh" +# Record exit code +functest_exit=$? echo "Functest log" echo "---------------------------------------------------------------------------------" ssh -F $HOME/.ssh/${DISTRO}-xci-vm-config ${DISTRO}_xci_vm_opnfv "cat /root/results/functest.log" echo "---------------------------------------------------------------------------------" -# check the log to see if we have any error -if ssh -F $HOME/.ssh/${DISTRO}-xci-vm-config ${DISTRO}_xci_vm_opnfv "grep -q 'FAIL' /root/results/functest.log"; then - echo "Error: Functest failed!" - exit 1 -fi +exit ${functest_exit} diff --git a/jjb/xci/xci-set-scenario.sh b/jjb/xci/xci-set-scenario.sh index c3012cd88..3e64ab140 100755 --- a/jjb/xci/xci-set-scenario.sh +++ b/jjb/xci/xci-set-scenario.sh @@ -96,22 +96,22 @@ function determine_generic_scenario() { # get the changeset cd $WORKSPACE - CHANGESET=$(git diff HEAD^..HEAD --name-only) - for CHANGED_FILE in $CHANGESET; do + SCENARIOS=$(git diff HEAD^..HEAD --name-only -- 'xci/scenarios' | cut -d "/" -f 3 | uniq) + # We need to set default scenario for changes that do not mess with scenarios + NO_SCENARIOS=$(git diff HEAD^..HEAD --name-only | grep -v 'xci/scenarios' | cut -d "/" -f 3 | uniq) + for CHANGED_SCENARIO in $SCENARIOS; do + [[ ${DEPLOY_SCENARIO[@]} =~ $CHANGED_SCENARIO ]] || DEPLOY_SCENARIO[${#DEPLOY_SCENARIO[@]}]=$CHANGED_SCENARIO + done + for CHANGED_FILE in $NO_SCENARIOS; do case $CHANGED_FILE in - *k8-nosdn*|*kubespray*) + kubespray) [[ ${DEPLOY_SCENARIO[@]} =~ "k8-nosdn-nofeature" ]] || DEPLOY_SCENARIO[${#DEPLOY_SCENARIO[@]}]='k8-nosdn-nofeature' ;; - *os-odl*) - [[ ${DEPLOY_SCENARIO[@]} =~ "os-odl-nofeature" ]] || DEPLOY_SCENARIO[${#DEPLOY_SCENARIO[@]}]='os-odl-nofeature' - ;; - *os-nosdn*|*osa*) - [[ ${DEPLOY_SCENARIO[@]} =~ "os-nosdn-nofeature" ]] || DEPLOY_SCENARIO[${#DEPLOY_SCENARIO[@]}]='os-nosdn-nofeature' - ;; + # Default case (including OSA changes) *) [[ ${DEPLOY_SCENARIO[@]} =~ "os-nosdn-nofeature" ]] || DEPLOY_SCENARIO[${#DEPLOY_SCENARIO[@]}]='os-nosdn-nofeature' ;; - esac + esac done # extract releng-xci sha diff --git a/jjb/yardstick/yardstick-daily-jobs.yml b/jjb/yardstick/yardstick-daily-jobs.yml index 24c7f319b..2eaa0feb1 100644 --- a/jjb/yardstick/yardstick-daily-jobs.yml +++ b/jjb/yardstick/yardstick-daily-jobs.yml @@ -15,8 +15,8 @@ branch: '{stream}' gs-pathname: '' docker-tag: 'latest' - euphrates: &euphrates - stream: euphrates + fraser: &fraser + stream: fraser branch: 'stable/{stream}' gs-pathname: '{stream}' docker-tag: 'stable' @@ -41,15 +41,15 @@ auto-trigger-name: 'daily-trigger-disabled' <<: *master - virtual: - slave-label: apex-virtual-euphrates + slave-label: apex-virtual-fraser installer: apex auto-trigger-name: 'daily-trigger-disabled' - <<: *euphrates + <<: *fraser - baremetal: - slave-label: apex-baremetal-euphrates + slave-label: apex-baremetal-fraser installer: apex auto-trigger-name: 'daily-trigger-disabled' - <<: *euphrates + <<: *fraser # fuel CI PODs - baremetal: slave-label: fuel-baremetal @@ -65,12 +65,12 @@ slave-label: fuel-baremetal installer: fuel auto-trigger-name: 'daily-trigger-disabled' - <<: *euphrates + <<: *fraser - virtual: slave-label: fuel-virtual installer: fuel auto-trigger-name: 'daily-trigger-disabled' - <<: *euphrates + <<: *fraser # armband CI PODs - armband-baremetal: slave-label: armband-baremetal @@ -86,12 +86,12 @@ slave-label: armband-baremetal installer: fuel auto-trigger-name: 'daily-trigger-disabled' - <<: *euphrates + <<: *fraser - armband-virtual: slave-label: armband-virtual installer: fuel auto-trigger-name: 'daily-trigger-disabled' - <<: *euphrates + <<: *fraser # joid CI PODs - baremetal: slave-label: joid-baremetal @@ -107,12 +107,12 @@ slave-label: joid-baremetal installer: joid auto-trigger-name: 'daily-trigger-disabled' - <<: *euphrates + <<: *fraser - virtual: slave-label: joid-virtual installer: joid auto-trigger-name: 'daily-trigger-disabled' - <<: *euphrates + <<: *fraser # compass CI PODs - baremetal: slave-label: compass-baremetal @@ -128,12 +128,12 @@ slave-label: compass-baremetal installer: compass auto-trigger-name: 'daily-trigger-disabled' - <<: *euphrates + <<: *fraser - virtual: slave-label: compass-virtual installer: compass auto-trigger-name: 'daily-trigger-disabled' - <<: *euphrates + <<: *fraser # daisy CI PODs - baremetal: slave-label: daisy-baremetal @@ -162,7 +162,7 @@ slave-label: '{pod}' installer: fuel auto-trigger-name: 'daily-trigger-disabled' - <<: *euphrates + <<: *fraser - zte-pod2: slave-label: '{pod}' installer: daisy @@ -330,7 +330,7 @@ description: 'Arguments to use in order to choose the backend DB' - parameter: - name: 'yardstick-params-apex-virtual-euphrates' + name: 'yardstick-params-apex-virtual-fraser' parameters: - string: name: YARDSTICK_DB_BACKEND @@ -338,7 +338,7 @@ description: 'Arguments to use in order to choose the backend DB' - parameter: - name: 'yardstick-params-apex-baremetal-euphrates' + name: 'yardstick-params-apex-baremetal-fraser' parameters: - string: name: YARDSTICK_DB_BACKEND diff --git a/jjb/yardstick/yardstick-project-jobs.yml b/jjb/yardstick/yardstick-project-jobs.yml index 63ce2986f..56e825e19 100644 --- a/jjb/yardstick/yardstick-project-jobs.yml +++ b/jjb/yardstick/yardstick-project-jobs.yml @@ -17,7 +17,7 @@ branch: '{stream}' gs-pathname: '' disabled: false - - euphrates: + - fraser: &fraser branch: 'stable/{stream}' gs-pathname: '/{stream}' disabled: false @@ -87,7 +87,8 @@ - string: name: GS_URL default: '$GS_BASE{gs-pathname}' - description: "Directory where the build artifact will be located upon the completion of the build." + description: "Directory where the build artifact will be located upon\ + \ the completion of the build." scm: - git-scm @@ -169,11 +170,11 @@ sudo apt-get -y clean && sudo apt-get -y autoremove echo "Configure RabbitMQ service" - service rabbitmq-server restart - rabbitmqctl start_app - if [ -z "$(rabbitmqctl list_users | grep yardstick)" ]; then - rabbitmqctl add_user yardstick yardstick - rabbitmqctl set_permissions yardstick ".*" ".*" ".*" + sudo service rabbitmq-server restart + sudo rabbitmqctl start_app + if [ -z "$(sudo rabbitmqctl list_users | grep yardstick)" ]; then + sudo rabbitmqctl add_user yardstick yardstick + sudo rabbitmqctl set_permissions yardstick ".*" ".*" ".*" fi echo "Running functional tests in Python 2.7 ..." @@ -193,11 +194,11 @@ sudo apt-get -y clean && sudo apt-get -y autoremove echo "Configure RabbitMQ service" - service rabbitmq-server restart - rabbitmqctl start_app - if [ -z "$(rabbitmqctl list_users | grep yardstick)" ]; then - rabbitmqctl add_user yardstick yardstick - rabbitmqctl set_permissions yardstick ".*" ".*" ".*" + sudo service rabbitmq-server restart + sudo rabbitmqctl start_app + if [ -z "$(sudo rabbitmqctl list_users | grep yardstick)" ]; then + sudo rabbitmqctl add_user yardstick yardstick + sudo rabbitmqctl set_permissions yardstick ".*" ".*" ".*" fi echo "Running functional tests in Python 3 ..." |