From 15eb566a951db5460f976ae3048e3f4014673cd7 Mon Sep 17 00:00:00 2001 From: Peter Mikus Date: Sun, 3 Feb 2019 16:35:49 +0000 Subject: CSIT-1419 Convert vpp-virl job to vpp-device Change-Id: Iaac6a6182904a7ab1595f7534f0afd64caab6256 Signed-off-by: Peter Mikus --- jjb/vpp/clone-csit-run-main.sh | 38 ----------- jjb/vpp/include-raw-vpp-csit-device.sh | 38 +++++++++++ jjb/vpp/include-raw-vpp-csit-functional.sh | 103 ----------------------------- jjb/vpp/include-raw-vpp-csit-perf.sh | 38 +++++++++++ jjb/vpp/vpp-macros.yaml | 4 +- jjb/vpp/vpp.yaml | 48 ++++++-------- 6 files changed, 99 insertions(+), 170 deletions(-) delete mode 100644 jjb/vpp/clone-csit-run-main.sh create mode 100644 jjb/vpp/include-raw-vpp-csit-device.sh delete mode 100644 jjb/vpp/include-raw-vpp-csit-functional.sh create mode 100644 jjb/vpp/include-raw-vpp-csit-perf.sh (limited to 'jjb') diff --git a/jjb/vpp/clone-csit-run-main.sh b/jjb/vpp/clone-csit-run-main.sh deleted file mode 100644 index f37d8e720..000000000 --- a/jjb/vpp/clone-csit-run-main.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/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-device.sh b/jjb/vpp/include-raw-vpp-csit-device.sh new file mode 100644 index 000000000..87be53f06 --- /dev/null +++ b/jjb/vpp/include-raw-vpp-csit-device.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash + +# Copyright (c) 2019 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_device.sh" diff --git a/jjb/vpp/include-raw-vpp-csit-functional.sh b/jjb/vpp/include-raw-vpp-csit-functional.sh deleted file mode 100644 index 5a7f27c6a..000000000 --- a/jjb/vpp/include-raw-vpp-csit-functional.sh +++ /dev/null @@ -1,103 +0,0 @@ -#!/bin/bash -set -xeu -o pipefail - -# 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/ -fi - -# Check for CSIT_REF test file -if [ -e CSIT_REF ]; then - source CSIT_REF -fi - -# If also testing a specific csit refpoint look for CSIT_REF -if [[ -v CSIT_REF ]]; then - (cd csit ; git fetch ssh://rotterdam-jobbuilder@gerrit.fd.io:29418/csit $CSIT_REF && git checkout FETCH_HEAD) -else - 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" - ;; - stable/1804 ) - BRANCH_ID="oper-rls1804" - ;; - stable/1807 ) - BRANCH_ID="oper-rls1807" - ;; - stable/1810 ) - BRANCH_ID="oper-rls1810" - ;; - stable/1901 ) - BRANCH_ID="oper-rls1901" - ;; - * ) - 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 -fi - -# execute csit bootstrap script if it exists -if [ -e bootstrap.sh ] -then - # make sure that bootstrap.sh is executable - chmod +x bootstrap.sh - # run the script - ./bootstrap.sh *.deb -else - echo 'ERROR: No bootstrap.sh found' - exit 1 -fi - -# vim: ts=4 ts=4 sts=4 et : diff --git a/jjb/vpp/include-raw-vpp-csit-perf.sh b/jjb/vpp/include-raw-vpp-csit-perf.sh new file mode 100644 index 000000000..f37d8e720 --- /dev/null +++ b/jjb/vpp/include-raw-vpp-csit-perf.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/vpp-macros.yaml b/jjb/vpp/vpp-macros.yaml index bb35466f0..36cf95922 100644 --- a/jjb/vpp/vpp-macros.yaml +++ b/jjb/vpp/vpp-macros.yaml @@ -60,13 +60,13 @@ notbuilt: true - trigger: - name: gerrit-trigger-csit-virltest + name: gerrit-trigger-csit-devicetest triggers: - gerrit: server-name: 'Primary' trigger-on: - comment-added-contains-event: - comment-contains-value: 'virltest' + comment-contains-value: 'devicetest' projects: - project-compare-type: 'ANT' project-pattern: '{name}' diff --git a/jjb/vpp/vpp.yaml b/jjb/vpp/vpp.yaml index 69a404ac9..5e8769a1e 100644 --- a/jjb/vpp/vpp.yaml +++ b/jjb/vpp/vpp.yaml @@ -54,7 +54,6 @@ - project: name: vpp-misc jobs: - - 'vpp-csit-verify-virl-{stream}' - 'vpp-checkstyle-verify-{stream}' project: 'vpp' stream: @@ -82,12 +81,13 @@ name: vpp-perpatch jobs: - 'vpp-csit-verify-perf-{stream}-2n-skx' + - 'vpp-csit-verify-device-{stream}-1n-skx' project: 'vpp' stream: - master: branch: 'master' repo-stream-part: 'master' - os: ubuntu1604 + os: ubuntu1804 - project: name: vpp-master-only @@ -928,10 +928,10 @@ fixed-delay: 90 - job-template: - name: 'vpp-csit-verify-virl-{stream}' + name: 'vpp-csit-verify-device-{stream}-1n-skx' project-type: freestyle - node: '{os}-us' + node: 'vpp-csit-device' concurrent: true build-discarder: @@ -948,12 +948,11 @@ - 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' - - string: - name: CSIT_REF - description: "Also testing CSIT_REF" + repo-name: '{repo-stream-part}.ubuntu.bionic.main' + - gerrit-refspec-parameter + - gerrit-event-type-parameter + - gerrit-event-comment-text-parameter + - gerrit-csit-refspec-parameter - stream-parameter: stream: '{stream}' @@ -968,33 +967,26 @@ build-timeout: '90' triggers: - - gerrit-trigger-csit-virltest: + - gerrit-trigger-csit-devicetest: name: '{project}' branch: '{branch}' builders: - - shell: 'echo "VPP_BRANCH={branch}" > $WORKSPACE/variables.prop' - - inject: - properties-file: variables.prop - shell: - !include-raw-escape: - - ../scripts/setup_vpp_ubuntu_docker_test.sh - - ../scripts/setup_vpp_dpdk_dev_env.sh - - include-raw-vpp-build.sh + !include-raw-escape: ../scripts/setup_vpp_ubuntu_docker_test.sh - shell: !include-raw-escape: - - include-raw-vpp-csit-functional.sh + - include-raw-vpp-csit-device.sh + publishers: - archive-artifacts: artifacts: > - **/csit/report.html, - **/csit/log.html, - **/csit/output.xml + **/csit_current/**/*.* latest-only: false - robot-report: - output-path: 'csit' + output-path: 'csit_current/' - fdio-infra-shiplogs: maven-version: 'mvn33-new' @@ -1003,7 +995,7 @@ name: 'vpp-csit-verify-perf-{stream}-2n-skx' project-type: freestyle - node: '{os}-basebuild-8c-32g' + node: '{os}-us' concurrent: true build-discarder: @@ -1052,19 +1044,21 @@ branch: '{branch}' builders: + - shell: + !include-raw-escape: ../scripts/setup_vpp_ubuntu_docker_test.sh - shell: !include-raw-escape: - - clone-csit-run-main.sh + - include-raw-vpp-csit-perf.sh publishers: - archive-artifacts: artifacts: > - **/csit_new/**/*.*, + **/csit_current/**/*.*, **/csit_parent/**/*.* latest-only: false - robot-report: - output-path: 'csit_new/0/' + output-path: 'csit_current/0/' - fdio-infra-shiplogs: maven-version: 'mvn33-new' -- cgit 1.2.3-korg