Add job for reports 29/74829/2
authorSam Hague <shague@redhat.com>
Fri, 3 Aug 2018 22:33:31 +0000 (18:33 -0400)
committerSam Hague <shague@redhat.com>
Mon, 15 Oct 2018 15:49:55 +0000 (11:49 -0400)
Change-Id: Iaf953243c6e55c9f707f43ac46dab0afcc58846f
Signed-off-by: Sam Hague <shague@redhat.com>
jjb/netvirt/netvirt-job-reports.yaml [new file with mode: 0644]
jjb/netvirt/run-reports.sh [new file with mode: 0644]

diff --git a/jjb/netvirt/netvirt-job-reports.yaml b/jjb/netvirt/netvirt-job-reports.yaml
new file mode 100644 (file)
index 0000000..26a32b7
--- /dev/null
@@ -0,0 +1,71 @@
+---
+- project:
+    name: netvirt-job-reports
+    project: netvirt
+    jobs:
+      - netvirt-job-reports
+    report-jobnames: >
+        netvirt-csit-1node-0cmb-1ctl-2cmp-openstack-queens-upstream-stateful-fluorine
+        netvirt-csit-1node-0cmb-1ctl-2cmp-openstack-queens-upstream-stateful-snat-conntrack-fluorine
+        netvirt-csit-1node-0cmb-1ctl-2cmp-openstack-queens-upstream-stateful-oxygen
+        netvirt-csit-1node-0cmb-1ctl-2cmp-openstack-queens-upstream-stateful-snat-conntrack-oxygen
+    report-logurl: 'https://logs.opendaylight.org/releng/vex-yul-odl-jenkins-1'
+    report-numjobs: 50
+    report-path: '/tmp/jobreports'
+
+- job-template:
+    name: '{prefix}netvirt-job-reports'
+    id: netvirt-job-reports
+    node: centos7-builder-2c-2g
+    project-type: freestyle
+    disabled: false
+
+    properties:
+      - opendaylight-infra-properties:
+          build-days-to-keep: '{build-days-to-keep}'
+
+    parameters:
+      - opendaylight-infra-parameters:
+          os-cloud: '{os-cloud}'
+          project: '{project}'
+          branch: '{branch}'
+          refspec: 'refs/heads/{branch}'
+          artifacts: '{archive-artifacts}'
+      - string:
+          name: JOB_NAMES
+          default: '{report-jobnames}'
+          description: |
+              Space separated list of job names to process. Example:
+              netvirt-csit-1node-0cmb-1ctl-2cmp-openstack-queens-upstream-stateful-fluorine
+              netvirt-csit-1node-0cmb-1ctl-2cmp-openstack-queens-upstream-stateful-snat-conntrack-fluorine
+      - string:
+          name: LOG_URL
+          default: '{report-logurl}'
+          description: 'Logs url'
+      - string:
+          name: NUM_JOBS
+          default: '{report-numjobs}'
+          description: 'Number of jobs to process'
+      - string:
+          name: REPORT_PATH
+          default: '{report-path}'
+          description: 'Output path to write files'
+
+    wrappers:
+      - opendaylight-infra-wrappers:
+          build-timeout: '{build-timeout}'
+
+    builders:
+      - run-job-reports
+
+    triggers:
+      - timed: '@daily'
+
+    publishers:
+      - lf-infra-publish
+
+- builder:
+    name: run-job-reports
+    builders:
+      - shell: !include-raw-escape:
+          - run-reports.sh
diff --git a/jjb/netvirt/run-reports.sh b/jjb/netvirt/run-reports.sh
new file mode 100644 (file)
index 0000000..2d5c99a
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/bash
+# SPDX-License-Identifier: EPL-1.0
+##############################################################################
+# Copyright (c) 2018 Red Hat, Inc. and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+##############################################################################
+
+echo "Executing run-reports.sh"
+set -e -o pipefail # Fail on errors, give stacktrace
+set -x # Enable trace
+
+virtualenv --quiet "/tmp/v/odltools"
+source /tmp/v/odltools/bin/activate
+pip install odltools
+mkdir $REPORT_PATH
+python -m odltools csit reports --numjobs $NUM_JOBS --path $REPORT_PATH --url $LOG_URL --jobnames $JOB_NAMES
+python -m odltools csit exceptions --numjobs $NUM_JOBS --path $REPORT_PATH --url $LOG_URL --jobnames $JOB_NAMES
+mkdir -p $WORKSPACE/archives
+cp $REPORT_PATH/*.txt $WORKSPACE/archives
+exit 0