abort-all-job: true
- multijob:
name: csit
- condition: SUCCESSFUL
+ condition: ALWAYS
projects:
- name: cperf-apex-csit-master
predefined-parameters: |
node-parameters: true
kill-phase-on: FAILURE
abort-all-job: false
+ - multijob:
+ name: csit-collect-logs
+ condition: ALWAYS
+ projects:
+ - name: cperf-upload-logs-csit
+ predefined-parameters: |
+ ODL_BRANCH=$BRANCH
+ OS_VERSION=$OS_VERSION
+ node-parameters: true
+ kill-phase-on: FAILURE
+ abort-all-job: false
- multijob:
name: postprocess
condition: ALWAYS
latest_snap=$(ls ${SNAP_CACHE} | grep tar.gz | tail -n 1)
if [ -n "$latest_snap" ]; then
local_snap_checksum=$(sha512sum ${SNAP_CACHE}/${latest_snap} | cut -d' ' -f1)
+ echo "Local snap checksum is: ${local_snap_checksum}"
fi
else
mkdir -p ${SNAP_CACHE}
jobs:
- 'cperf-{installer}-{testsuite}-{stream}'
+ - 'cperf-upload-logs-csit'
################################
# job template
builders:
- 'cperf-{testsuite}-builder'
+- job-template:
+ name: 'cperf-upload-logs-csit'
+
+ concurrent: true
+
+ disabled: false
+ scm:
+ - git-scm-gerrit
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ branch: '{branch}'
+ - cperf-parameter:
+ testsuite: 'csit'
+ gs-pathname: '{gs-pathname}'
+ docker-tag: '{docker-tag}'
+ stream: '{stream}'
+
+ # yamllint enable rule:line-length
+ properties:
+ - logrotate-default
+ - throttle:
+ max-per-node: 1
+ max-total: 10
+ option: 'project'
+
+ builders:
+ - 'cperf-upload-logs-csit'
+
########################
# parameter macros
########################
docker rmi opnfv/cperf:$tag >/dev/null
done
fi
+
+- builder:
+ name: cperf-upload-logs-csit
+ builders:
+ - shell: !include-raw: ./cperf-upload-logs-csit.sh
--- /dev/null
+#!/usr/bin/env bash
+
+set -o errexit
+set -o nounset
+set -o pipefail
+
+LOGS_LOCATION=/tmp/robot_results
+UPLOAD_LOCATION=artifacts.opnfv.org/cperf/cperf-apex-csit-${ODL_BRANCH}/${BUILD_NUMBER}/
+echo "Uploading robot logs to ${UPLOAD_LOCATION}"
+gsutil -m cp -r -v ${LOGS_LOCATION} gs://${UPLOAD_LOCATION} > gsutil.latest_logs.log