diff options
author | Vratko Polak <vrpolak@cisco.com> | 2018-08-13 15:40:41 +0200 |
---|---|---|
committer | Vratko Polak <vrpolak@cisco.com> | 2018-09-06 13:55:08 +0200 |
commit | 28d566b7719bcaac29b2127acae419d7d99601d5 (patch) | |
tree | a29525c31dda14292b2febdb2b1566ab44c70107 | |
parent | b46daec96734a6d59a25a01349ae704620ed7b8c (diff) |
CSIT-1264: Job for per-patch VPP perf testing
Most logic is in CSIT repository.
+ Hardcode topology type of vpp-csit-verify-perf-{stream}- job.
+ Introduce gerrit related parameters to enable Sandbox testing.
+ Add the parameters to vpp-csit and csit-vpp perf verify jobs.
Change-Id: I8643b4ba352122c51289db923f0d0ebe597d08e4
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
-rw-r--r-- | jjb/csit/csit.yaml | 3 | ||||
-rw-r--r-- | jjb/global-macros.yaml | 25 | ||||
-rw-r--r-- | jjb/vpp/clone-csit-run-main.sh | 38 | ||||
-rw-r--r-- | jjb/vpp/include-raw-vpp-csit-verify-perf.sh | 96 | ||||
-rw-r--r-- | jjb/vpp/vpp.yaml | 39 |
5 files changed, 86 insertions, 115 deletions
diff --git a/jjb/csit/csit.yaml b/jjb/csit/csit.yaml index 842064faf..013b37303 100644 --- a/jjb/csit/csit.yaml +++ b/jjb/csit/csit.yaml @@ -1357,6 +1357,9 @@ project: '{project}' - gerrit-parameter: branch: '{branch}' + - gerrit-refspec-parameter + - gerrit-event-type-parameter + - gerrit-event-comment-text-parameter scm: - gerrit-trigger-scm: diff --git a/jjb/global-macros.yaml b/jjb/global-macros.yaml index d34e4e23a..8bca2e067 100644 --- a/jjb/global-macros.yaml +++ b/jjb/global-macros.yaml @@ -105,6 +105,31 @@ default: '{arch}' description: "Architecture parameter" +- parameter: + name: gerrit-event-type-parameter + parameters: + - string: + name: GERRIT_EVENT_TYPE + default: '' + description: "GERRIT_EVENT_TYPE parameter not given by trigger" + +- parameter: + name: gerrit-event-comment-text-parameter + parameters: + - string: + name: GERRIT_EVENT_COMMENT_TEXT + default: '' + description: "GERRIT_EVENT_COMMENT_TEXT parameter not given by trigger" + +- parameter: + name: gerrit-csit-refspec-parameter + parameters: + - string: + name: CSIT_REF + default: '' + description: "GERRIT_REFSPEC parameter to override separately cloned CSIT repository, leave empty for autodetection / no override." + # FIXME: Wrap long lines. + ##### SCMS - scm: name: git-scm diff --git a/jjb/vpp/clone-csit-run-main.sh b/jjb/vpp/clone-csit-run-main.sh new file mode 100644 index 000000000..f37d8e720 --- /dev/null +++ b/jjb/vpp/clone-csit-run-main.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash + +# Copyright (c) 2018 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -exuo pipefail + +# Clone CSIT git repository and proceed with entry script located there. +# +# Variables read: +# - WORKSPACE - Jenkins workspace to create csit subdirectory in. +# - CSIT_REF - Override ref of CSIT git repository to checkout. +# Directories updated: +# - ${WORKSPACE}/csit - Created, holding a checked out CSIT repository. +# - Multiple other side effects by entry script(s), see CSIT repository. + +cd "${WORKSPACE}" +git clone https://gerrit.fd.io/r/csit --depth=1 --no-single-branch --no-checkout +pushd "${WORKSPACE}/csit" +if [[ -n "${CSIT_REF-}" ]]; then + git fetch --depth=1 https://gerrit.fd.io/r/csit "${CSIT_REF}" + git checkout FETCH_HEAD +else + git checkout HEAD +fi +popd +csit_entry_dir="${WORKSPACE}/csit/resources/libraries/bash/entry" +source "${csit_entry_dir}/with_oper_for_vpp.sh" "per_patch_perf.sh" diff --git a/jjb/vpp/include-raw-vpp-csit-verify-perf.sh b/jjb/vpp/include-raw-vpp-csit-verify-perf.sh deleted file mode 100644 index c593048be..000000000 --- a/jjb/vpp/include-raw-vpp-csit-verify-perf.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/bin/bash - -set -xeu -o pipefail - -if [[ ${GERRIT_EVENT_TYPE} == 'comment-added' ]]; then - TRIGGER=`echo ${GERRIT_EVENT_COMMENT_TEXT} \ - | grep -oE '(perftest$|perftest[[:space:]].+$)'` -else - TRIGGER='' -fi -# Export test type. -export TEST_TAG="VERIFY-PERF-PATCH" -# Export test tags as string. -export TEST_TAG_STRING=${TRIGGER#$"perftest"} - -# Get CSIT branch from which to test from -# running build-root/scripts/csit-test-branch -if [ -x build-root/scripts/csit-test-branch ]; then - CSIT_BRANCH=`build-root/scripts/csit-test-branch`; -fi - -# check CSIT_BRANCH value -if [ "$CSIT_BRANCH" == "" ]; then - echo "CSIT_BRANCH not provided => 'latest' will be used" - CSIT_BRANCH="latest" -fi - -# clone csit -git clone --depth 1 --no-single-branch https://gerrit.fd.io/r/csit - -# if the git clone fails, complain clearly and exit -if [ $? != 0 ]; then - echo "Failed to run: git clone --depth 1 --no-single-branch https://gerrit.fd.io/r/csit" - exit 1 -fi - -cp build-root/*.deb csit/ -if [ -e dpdk/vpp-dpdk-dkms*.deb ] -then - cp dpdk/vpp-dpdk-dkms*.deb csit/ -else - cp /w/dpdk/vpp-dpdk-dkms*.deb csit/ 2>/dev/null || : - cp /var/cache/apt/archives/vpp-dpdk-dkms*.deb csit/ 2>/dev/null || : -fi - -cd csit - -if [ "$CSIT_BRANCH" == "latest" ]; then - # set required CSIT branch_id based on VPP master branch; by default use 'oper' - case "$VPP_BRANCH" in - master ) - BRANCH_ID="oper" - ;; - stable/1710 ) - BRANCH_ID="oper-rls1710" - ;; - stable/1801 ) - BRANCH_ID="oper-rls1801" - ;; - * ) - BRANCH_ID="oper" - esac - - # get the latest verified version of the required branch - CSIT_BRANCH=$(echo $(git branch -r | grep -E "${BRANCH_ID}-[0-9]+" | tail -n 1)) - - if [ "${CSIT_BRANCH}" == "" ]; then - echo "No verified CSIT branch found - exiting" - exit 1 - fi - - # remove 'origin/' from the branch name - CSIT_BRANCH=$(echo ${CSIT_BRANCH#origin/}) -fi - -# checkout the required csit branch -git checkout ${CSIT_BRANCH} - -if [ $? != 0 ]; then - echo "Failed to checkout the required CSIT branch: ${CSIT_BRANCH}" - exit 1 -fi - -# execute csit bootstrap script if it exists -if [ ! -e bootstrap-verify-perf.sh ] -then - echo 'ERROR: No bootstrap-verify-perf.sh found' - exit 1 -fi - -# make sure that bootstrap-verify-perf.sh is executable -chmod +x bootstrap-verify-perf.sh -# run the script -./bootstrap-verify-perf.sh *.deb - -# vim: ts=4 ts=4 sts=4 et : diff --git a/jjb/vpp/vpp.yaml b/jjb/vpp/vpp.yaml index 7da9e38b2..cfcbe813d 100644 --- a/jjb/vpp/vpp.yaml +++ b/jjb/vpp/vpp.yaml @@ -56,7 +56,7 @@ name: vpp-misc jobs: - 'vpp-csit-verify-virl-{stream}' - - 'vpp-csit-verify-hw-perf-{stream}' + - 'vpp-csit-verify-perf-{stream}-2n-skx' - 'vpp-checkstyle-verify-{stream}' project: 'vpp' stream: @@ -492,8 +492,6 @@ max-failed-builds: 1 fixed-delay: 90 - - - job-template: name: 'vpp-verify-{stream}-{os}' @@ -768,11 +766,11 @@ maven-version: 'mvn33-new' - job-template: - name: 'vpp-csit-verify-hw-perf-{stream}' + name: 'vpp-csit-verify-perf-{stream}-2n-skx' project-type: freestyle node: '{os}-basebuild-8c-32g' - concurrent: false + concurrent: true logrotate: daysToKeep: '{build-days-to-keep}' @@ -788,9 +786,19 @@ - os-parameter: os: '{os}' - repo-name-parameter: - repo-name: '{repo-stream-part}.ubuntu.xenial.main' - - is-csit-vpp-job-parameter: - is-csit-vpp-job: 'True' + repo-name: '{repo-stream-part}.ubuntu.bionic.main' + - gerrit-refspec-parameter + - gerrit-event-type-parameter + - gerrit-event-comment-text-parameter + - gerrit-csit-refspec-parameter + - string: + name: CSIT_PERF_TRIAL_DURATION + default: "1.0" + description: "Duration of a trial measurement in BMRR tests." + - string: + name: CSIT_PERF_TRIAL_MULTIPLICITY + default: "30" + description: "Number of subsamples for BMRR tests." scm: - gerrit-trigger-scm: @@ -800,7 +808,7 @@ wrappers: - fdio-infra-wrappers-non-activity-timeout: - build-timeout: 30 + build-timeout: 300 triggers: - gerrit: @@ -821,24 +829,17 @@ notbuilt: false builders: - - shell: 'echo "VPP_BRANCH={branch}" > $WORKSPACE/variables.prop' - - inject: - properties-file: variables.prop - - shell: - !include-raw-escape: - - ../scripts/setup_vpp_dpdk_dev_env.sh - - include-raw-vpp-build.sh - shell: !include-raw-escape: - - include-raw-vpp-csit-verify-perf.sh + - clone-csit-run-main.sh publishers: - archive-artifacts: - artifacts: 'csit/archive/*.*' + artifacts: 'csit_new/*.*, csit_parent/*.*' latest-only: false - robot-report: - output-path: 'csit/archive/*.*' + output-path: 'csit_new/' - fdio-infra-shiplogs: maven-version: 'mvn33-new' |