diff options
Diffstat (limited to 'jjb/scripts/vpp')
-rw-r--r-- | jjb/scripts/vpp/api-checkstyle.sh | 22 | ||||
-rw-r--r-- | jjb/scripts/vpp/build.sh | 193 | ||||
-rwxr-xr-x[-rw-r--r--] | jjb/scripts/vpp/check_crc.sh | 7 | ||||
-rwxr-xr-x[-rw-r--r--] | jjb/scripts/vpp/checkstyle.sh | 35 | ||||
-rw-r--r-- | jjb/scripts/vpp/commitmsg.sh | 19 | ||||
-rw-r--r-- | jjb/scripts/vpp/copy_archives.sh | 38 | ||||
-rw-r--r-- | jjb/scripts/vpp/cov-build.sh | 106 | ||||
-rw-r--r-- | jjb/scripts/vpp/coverity.sh | 32 | ||||
-rw-r--r-- | jjb/scripts/vpp/csit-bisect.sh | 38 | ||||
-rwxr-xr-x[-rw-r--r--] | jjb/scripts/vpp/csit-device.sh | 7 | ||||
-rwxr-xr-x[-rw-r--r--] | jjb/scripts/vpp/csit-perf.sh | 7 | ||||
-rw-r--r-- | jjb/scripts/vpp/debug-build.sh | 107 | ||||
-rwxr-xr-x[-rw-r--r--] | jjb/scripts/vpp/docs.sh | 67 | ||||
-rwxr-xr-x | jjb/scripts/vpp/docs_spell.sh | 23 | ||||
-rw-r--r-- | jjb/scripts/vpp/dpdk-rdma-version-mismatch.sh | 33 | ||||
-rw-r--r-- | jjb/scripts/vpp/gcc-build.sh | 78 | ||||
-rw-r--r-- | jjb/scripts/vpp/make-test-docs.sh | 49 | ||||
-rw-r--r-- | jjb/scripts/vpp/maven-push.sh | 56 | ||||
-rw-r--r-- | jjb/scripts/vpp/sphinx-docs.sh | 50 | ||||
-rw-r--r-- | jjb/scripts/vpp/test-checkstyle.sh | 16 |
20 files changed, 627 insertions, 356 deletions
diff --git a/jjb/scripts/vpp/api-checkstyle.sh b/jjb/scripts/vpp/api-checkstyle.sh index 90740337e..a1c2f84a1 100644 --- a/jjb/scripts/vpp/api-checkstyle.sh +++ b/jjb/scripts/vpp/api-checkstyle.sh @@ -1,5 +1,20 @@ #!/bin/bash +# Copyright (c) 2020 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. + +echo "---> jjb/scripts/vpp/api-checkstyle.sh" + VPP_CRC_CHECKER="extras/scripts/crcchecker.py" VPP_CRC_CHECKER_CMD="$VPP_CRC_CHECKER --check-patchset" @@ -11,13 +26,12 @@ send_notify() { } if [ -f $VPP_CRC_CHECKER ]; then + # API checker complains if the git repo is not clean. + # Help diagnosing those issues easier + git --no-pager diff echo "Running $VPP_CRC_CHECKER_CMD" if $VPP_CRC_CHECKER_CMD; then echo "API check successful" - - # for now - notify the same room during the monitoring period about the successes as well - WEBEX_TEAMS_MESSAGE="API check successful for $GERRIT_REFSPEC - see $BUILD_URL" - send_notify else RET_CODE=$? echo "API check failed: ret code $RET_CODE; please read https://wiki.fd.io/view/VPP/ApiChangeProcess and discuss with ayourtch@gmail.com if unsure how to proceed" diff --git a/jjb/scripts/vpp/build.sh b/jjb/scripts/vpp/build.sh index 68fa30d1a..850d61003 100644 --- a/jjb/scripts/vpp/build.sh +++ b/jjb/scripts/vpp/build.sh @@ -1,90 +1,139 @@ #!/bin/bash -# basic build script example -set -xe -o pipefail -OS_ID=$(grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g') -OS_VERSION_ID=$(grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g') +# Copyright (c) 2021 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. -echo OS_ID: $OS_ID -echo OS_VERSION_ID: $OS_VERSION_ID +echo "---> jjb/scripts/vpp/build.sh" -# do nothing but print the current slave hostname -hostname -export CCACHE_DIR=/tmp/ccache -if [ -d $CCACHE_DIR ];then - echo $CCACHE_DIR exists - du -sk $CCACHE_DIR -else - echo $CCACHE_DIR does not exist. This must be a new slave. -fi - -echo "cat /etc/bootstrap.sha" -if [ -f /etc/bootstrap.sha ];then - cat /etc/bootstrap.sha -else - echo "Cannot find cat /etc/bootstrap.sha" -fi +set -euxo pipefail -echo "cat /etc/bootstrap-functions.sha" -if [ -f /etc/bootstrap-functions.sha ];then - cat /etc/bootstrap-functions.sha -else - echo "Cannot find cat /etc/bootstrap-functions.sha" +line="*************************************************************************" +# Don't build anything if this is a merge job being run when +# the git HEAD id is not the same as the Gerrit New Revision id. +if [[ ${JOB_NAME} == *merge* ]] && [ -n "${GERRIT_NEWREV:-}" ] && + [ "$GERRIT_NEWREV" != "$GIT_COMMIT" ] ; then + echo -e "\n$line\nSkipping build. A newer patch has been merged.\n$line\n" + exit 0 fi -echo "sha1sum of this script: ${0}" -sha1sum $0 - -echo "CC=${CC}" -echo "IS_CSIT_VPP_JOB=${IS_CSIT_VPP_JOB}" -# If and only if we are doing verify *after* make verify was made to work -# and we are not a CSIT job just building packages, then use make verify, -# else use make pkg-verify. +OS_ID=$(grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g') +OS_VERSION_ID=$(grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g') +OS_ARCH=$(uname -m) +DRYRUN="${DRYRUN:-}" +IS_CSIT_VPP_JOB="${IS_CSIT_VPP_JOB:-}" +MAKE_PARALLEL_FLAGS="${MAKE_PARALLEL_FLAGS:-}" +MAKE_PARALLEL_JOBS="${MAKE_PARALLEL_JOBS:-}" +MAKE_TEST_OS="${MAKE_TEST_OS:-ubuntu-22.04}" +MAKE_TEST_MULTIWORKER_OS="${MAKE_TEST_MULTIWORKER_OS:-debian-11}" +VPPAPIGEN_TEST_OS="${VPPAPIGEN_TEST_OS:-${MAKE_TEST_OS}}" +BUILD_RESULT="SUCCESSFULLY COMPLETED" +BUILD_ERROR="" +RETVAL="0" -if [ "x${MAKE_PARALLEL_FLAGS}" != "x" ] -then +if [ -n "${MAKE_PARALLEL_FLAGS}" ] ; then echo "Building VPP. Number of cores for build set with" \ "MAKE_PARALLEL_FLAGS='${MAKE_PARALLEL_FLAGS}'." -elif [ "x${MAKE_PARALLEL_JOBS}" != "x" ] -then +elif [ -n "${MAKE_PARALLEL_JOBS}" ] ; then echo "Building VPP. Number of cores for build set with" \ "MAKE_PARALLEL_JOBS='${MAKE_PARALLEL_JOBS}'." else - echo "Building VPP. Number of cores not set, " \ - "using build default ($(grep -c ^processor /proc/cpuinfo))." + echo "Building VPP. Number of cores not set," \ + "using build default ($(grep -c ^processor /proc/cpuinfo))." fi -if [ "x${MAKE_PARALLEL_JOBS}" != "x" ] -then - export TEST_JOBS="${MAKE_PARALLEL_JOBS}" - echo "Testing VPP with ${TEST_JOBS} cores." -else - export TEST_JOBS="auto" - echo "Testing VPP with automatically calculated number of cores. " \ - "See test logs for the exact number." -fi +make_build_test() { + if ! make UNATTENDED=yes install-dep ; then + BUILD_ERROR="FAILED 'make install-dep'" + return + fi + if ! make UNATTENDED=yes install-ext-deps ; then + BUILD_ERROR="FAILED 'make install-ext-deps'" + return + fi + if [ -f extras/scripts/build_static_vppctl.sh ]; then + if ! extras/scripts/build_static_vppctl.sh ; then + BUILD_ERROR="FAILED 'extras/scripts/build_static_vppctl.sh'" + return + fi + fi + if ! make UNATTENDED=yes test-dep ; then + BUILD_ERROR="FAILED 'make test-dep'" + return + fi + if ! make UNATTENDED=yes pkg-verify ; then + BUILD_ERROR="FAILED 'make pkg-verify'" + return + fi + if [ "${IS_CSIT_VPP_JOB,,}" == "true" ] ; then + # CSIT jobs don't need to run make test + return + fi + if [ -n "${MAKE_PARALLEL_JOBS}" ] ; then + TEST_JOBS="${MAKE_PARALLEL_JOBS}" + echo "Testing VPP with ${TEST_JOBS} cores." + else + TEST_JOBS="auto" + echo "Testing VPP with automatically calculated number of cores. " \ + "See test logs for the exact number." + fi + if grep -q "${OS_ID}-${OS_VERSION_ID}" <<< "${VPPAPIGEN_TEST_OS}"; then + if ! src/tools/vppapigen/test_vppapigen.py ; then + BUILD_ERROR="FAILED src/tools/vppapigen/test_vppapigen.py" + return + fi + fi + if grep -q "${OS_ID}-${OS_VERSION_ID}" <<< "${MAKE_TEST_OS}"; then + if ! make COMPRESS_FAILED_TEST_LOGS=yes TEST_JOBS="$TEST_JOBS" RETRIES=3 test ; then + BUILD_ERROR="FAILED 'make test'" + return + fi + else + echo "Skip running 'make test' on ${OS_ID}-${OS_VERSION_ID}" + fi + if grep -q "${OS_ID}-${OS_VERSION_ID}" <<< "${MAKE_TEST_MULTIWORKER_OS}"; then + if git grep -q VPP_WORKER_CONFIG ; then + if ! make VPP_WORKER_CONFIG="workers 2" COMPRESS_FAILED_TEST_LOGS=yes \ + RETRIES=3 TEST_JOBS="$TEST_JOBS" test ; then + BUILD_ERROR="FAILED 'make test' with VPP_WORKER_CONFIG='workers 2'" + return + else + echo -e "\n* VPP ${OS_ID^^}-${OS_VERSION_ID}-${OS_ARCH^^}" \ + "MULTIWORKER MAKE TEST SUCCESSFULLY COMPLETED\n" + fi + elif git grep -q VPP_WORKER_COUNT ; then + if ! make VPP_WORKER_COUNT="2" COMPRESS_FAILED_TEST_LOGS=yes \ + RETRIES=3 TEST_JOBS="$TEST_JOBS" test ; then + BUILD_ERROR="FAILED 'make test' with VPP_WORKER_CONFIG='workers 2'" + return + else + echo -e "\n* VPP ${OS_ID^^}-${OS_VERSION_ID}-${OS_ARCH^^}" \ + "MULTIWORKER MAKE TEST SUCCESSFULLY COMPLETED\n" + fi + else + echo "Skip running MULTIWORKER MAKE TEST on ${OS_ID}-${OS_VERSION_ID}" + fi + else + echo "Skip running MULTIWORKER MAKE TEST on ${OS_ID}-${OS_VERSION_ID}" + fi +} -if (git log --oneline | grep 37682e1 > /dev/null 2>&1) && \ - [ "x${IS_CSIT_VPP_JOB}" != "xTrue" ] -then - echo "Building using \"make verify\"" - [ "x${DRYRUN}" == "xTrue" ] || make UNATTENDED=yes verify -else - echo "Building using \"make pkg-verify\"" - [ "x${DRYRUN}" == "xTrue" ] || make UNATTENDED=yes pkg-verify +if [ "${DRYRUN,,}" != "true" ] ; then + make_build_test fi - -if [ "x${VPP_REPO}" == "x1" ]; then - if [ "x${REBASE_NEEDED}" == "x1" ]; then - echo "This patch to vpp is based on an old point in the tree that is likely" - echo "to fail verify." - echo "PLEASE REBASE PATCH ON THE CURRENT HEAD OF THE VPP REPO" - exit 1 - fi +if [ -n "$BUILD_ERROR" ] ; then + BUILD_RESULT="$BUILD_ERROR" + RETVAL="1" fi - -local_arch=$(uname -m) - -echo "*******************************************************************" -echo "* VPP ${local_arch^^} BUILD SUCCESSFULLY COMPLETED" -echo "*******************************************************************" +echo -e "\n$line\n* VPP ${OS_ID^^}-${OS_VERSION_ID}-${OS_ARCH^^}" \ + "BUILD $BUILD_RESULT\n$line\n" +exit $RETVAL diff --git a/jjb/scripts/vpp/check_crc.sh b/jjb/scripts/vpp/check_crc.sh index 04e53966d..c0a9d507d 100644..100755 --- a/jjb/scripts/vpp/check_crc.sh +++ b/jjb/scripts/vpp/check_crc.sh @@ -13,22 +13,25 @@ # See the License for the specific language governing permissions and # limitations under the License. +echo "---> jjb/scripts/vpp/check_crc.sh" + set -exuo pipefail # Clone CSIT git repository and proceed with entry script located there. # # Variables read: # - WORKSPACE - Jenkins workspace to create csit subdirectory in. +# - GIT_URL - Git clone URL # - 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 +git clone "${GIT_URL}/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 fetch --depth=1 "${GIT_URL}/csit" "${CSIT_REF}" git checkout FETCH_HEAD else git checkout HEAD diff --git a/jjb/scripts/vpp/checkstyle.sh b/jjb/scripts/vpp/checkstyle.sh index 7c520dd99..00fc8bdb8 100644..100755 --- a/jjb/scripts/vpp/checkstyle.sh +++ b/jjb/scripts/vpp/checkstyle.sh @@ -1,5 +1,38 @@ #!/bin/bash -# jjb/vpp/include-raw-vpp-checkstyle.sh + +# Copyright (c) 2020 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. + +echo "---> jjb/scripts/vpp/checkstyle.sh" + +# If mlx_rdma_dpdk_matrix.txt file has been updated in the current changeset, +# verify the current rdma-core_version and dpdk_version exist in the matrix +# file +LINE="*******************************************************************" +BUILD_EXT_DIR="build/external" +MATRIX_FILE="$BUILD_EXT_DIR/mlx_rdma_dpdk_matrix.txt" +PKGS_DIR="$BUILD_EXT_DIR/packages" +if git show --stat | grep -q "$MATRIX_FILE" ; then + RDMA_CORE_VERSION="$(grep rdma-core_version $PKGS_DIR/rdma-core.mk | grep -v '(' | mawk '{print $3}')" + DPDK_VERSION="$(grep dpdk_version $PKGS_DIR/dpdk.mk | grep -v '(' | mawk '{print $3}')" + CURRENT_MATRIX="rdma=$RDMA_CORE_VERSION dpdk=$DPDK_VERSION" + if grep -q "$CURRENT_MATRIX" "$MATRIX_FILE"; then + echo -e "$LINE\n* DPDK/RDMA-CORE matrix file update successfully verified\n$LINE" + else + echo -e "$LINE\n* ERROR: 'rdma=$RDMA_CORE_VERSION dpdk=$DPDK_VERSION' not found in $MATRIX_FILE!\n$LINE" + exit 1 + fi +fi if [ -n "$(grep -E '^checkstyle:' Makefile)" ] then diff --git a/jjb/scripts/vpp/commitmsg.sh b/jjb/scripts/vpp/commitmsg.sh index d926ff5dd..479f35136 100644 --- a/jjb/scripts/vpp/commitmsg.sh +++ b/jjb/scripts/vpp/commitmsg.sh @@ -1,7 +1,22 @@ #!/bin/bash -if [ -f extras/scripts/check_commit_msg.sh ];then - echo "Running extras/scripts/check_commit_msg.sh" +# Copyright (c) 2020 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. + +echo "---> jjb/scripts/vpp/commitmsg.sh" + +if [ -f extras/scripts/check_commit_msg.sh ] ; then + echo "Running extras/scripts/check_commit_msg.sh" extras/scripts/check_commit_msg.sh else echo "Cannot find cat extras/scripts/check_commit_msg.sh - skipping commit message check" diff --git a/jjb/scripts/vpp/copy_archives.sh b/jjb/scripts/vpp/copy_archives.sh new file mode 100644 index 000000000..dafcd4aef --- /dev/null +++ b/jjb/scripts/vpp/copy_archives.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash + +# Copyright (c) 2023 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. + +echo "---> jjb/scripts/vpp/copy_archives.sh" + +set -xuo pipefail +set +e + +# Copy robot archives from perf job to where archive macro needs them. +# +# This has to be a script separate from csit-perf.sh, run as publisher, +# because otherwise it is not easily possible to ensure this is executed +# also when there is a test case failure. +# +# This can be removed when all CSIT branches use correct archive directory. +# For fixed CSIT, the copy will fail, so errors are ignored everywhere. +# +# Variables read: +# - WORKSPACE - Jenkins workspace to create csit subdirectory in. +# Directories updated: +# - ${WORKSPACE}/archives/csit_* - Test results for various VPP builds are here. +# e.g. csit_current and csit_parent for vpp per-patch perf job. + +mkdir -p "${WORKSPACE}/archives" +# Using asterisk as bisect job creates variable number of directories. +cp -Rv "${WORKSPACE}/csit_"* "${WORKSPACE}/archives" diff --git a/jjb/scripts/vpp/cov-build.sh b/jjb/scripts/vpp/cov-build.sh new file mode 100644 index 000000000..15f86c3bf --- /dev/null +++ b/jjb/scripts/vpp/cov-build.sh @@ -0,0 +1,106 @@ +#!/bin/bash + +# Copyright (c) 2023 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. + +echo "---> jjb/scripts/vpp/cov-build.sh" + +set -euxo pipefail + +line="*************************************************************************" +# Don't build anything if this is a merge job. +if [[ ${JOB_NAME} == *merge* ]] ; then + echo -e "\n$line\nSkipping build." + exit 0 +fi + +OS_ID=$(grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g') +OS_VERSION_ID=$(grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g') +OS_ARCH=$(uname -m) +DRYRUN="${DRYRUN:-}" +IS_CSIT_VPP_JOB="${IS_CSIT_VPP_JOB:-}" +MAKE_PARALLEL_FLAGS="${MAKE_PARALLEL_FLAGS:-}" +MAKE_PARALLEL_JOBS="${MAKE_PARALLEL_JOBS:-}" +MAKE_TEST_OS="${MAKE_TEST_OS:-ubuntu-22.04}" +MAKE_TEST_MULTIWORKER_OS="${MAKE_TEST_MULTIWORKER_OS:-debian-11}" +VPPAPIGEN_TEST_OS="${VPPAPIGEN_TEST_OS:-${MAKE_TEST_OS}}" +BUILD_RESULT="SUCCESSFULLY COMPLETED" +BUILD_ERROR="" +RETVAL="0" + +if [ -n "${MAKE_PARALLEL_FLAGS}" ] ; then + echo "Building VPP. Number of cores for build set with" \ + "MAKE_PARALLEL_FLAGS='${MAKE_PARALLEL_FLAGS}'." +elif [ -n "${MAKE_PARALLEL_JOBS}" ] ; then + echo "Building VPP. Number of cores for build set with" \ + "MAKE_PARALLEL_JOBS='${MAKE_PARALLEL_JOBS}'." +else + echo "Building VPP. Number of cores not set," \ + "using build default ($(grep -c ^processor /proc/cpuinfo))." +fi + +make_test_coverage_report() { + if ! make UNATTENDED=yes install-dep ; then + BUILD_ERROR="FAILED 'make install-dep'" + return + fi + if ! make UNATTENDED=yes install-ext-deps ; then + BUILD_ERROR="FAILED 'make install-ext-deps'" + return + fi + if ! make UNATTENDED=yes test-dep ; then + BUILD_ERROR="FAILED 'make test-dep'" + return + fi + if ! make UNATTENDED=yes CCACHE_DISABLE=1 pkg-verify ; then + BUILD_ERROR="FAILED 'make pkg-verify'" + return + fi + if [ "${IS_CSIT_VPP_JOB,,}" == "true" ] ; then + # CSIT jobs don't need to run make test + return + fi + if [ -n "${MAKE_PARALLEL_JOBS}" ] ; then + TEST_JOBS="${MAKE_PARALLEL_JOBS}" + echo "Testing VPP with ${TEST_JOBS} cores." + else + TEST_JOBS="auto" + echo "Testing VPP with automatically calculated number of cores. " \ + "See test logs for the exact number." + fi + if grep -q "${OS_ID}-${OS_VERSION_ID}" <<< "${VPPAPIGEN_TEST_OS}"; then + if ! src/tools/vppapigen/test_vppapigen.py ; then + BUILD_ERROR="FAILED src/tools/vppapigen/test_vppapigen.py" + return + fi + fi + if grep -q "${OS_ID}-${OS_VERSION_ID}" <<< "${MAKE_TEST_OS}"; then + if ! make COMPRESS_FAILED_TEST_LOGS=yes TEST_JOBS="$TEST_JOBS" CCACHE_DISABLE=1 test-cov ; then + BUILD_ERROR="FAILED 'make test-cov'" + return + fi + else + echo "Skip running 'make test-cov' on ${OS_ID}-${OS_VERSION_ID}" + fi +} + +if [ "${DRYRUN,,}" != "true" ] ; then + make_test_coverage_report +fi +if [ -n "$BUILD_ERROR" ] ; then + BUILD_RESULT="$BUILD_ERROR" + RETVAL="1" +fi +echo -e "\n$line\n* VPP ${OS_ID^^}-${OS_VERSION_ID}-${OS_ARCH^^}" \ + "TEST COVERAGE REPORT $BUILD_RESULT\n$line\n" +exit $RETVAL diff --git a/jjb/scripts/vpp/coverity.sh b/jjb/scripts/vpp/coverity.sh deleted file mode 100644 index 47a316a89..000000000 --- a/jjb/scripts/vpp/coverity.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -FILE="scan.txt" -OUTPUT="output.txt" - -wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -dpkg -i google-chrome-stable_current_amd64.deb || true -apt-get install -f -y - -google-chrome --headless --disable-gpu -dump-dom --no-sandbox https://scan.coverity.com/projects/fd-io-vpp > $FILE - -grep -i '<dt>Newly detected</dt>' $FILE || exit 42 - -NEW=$(grep -i -B 1 '<dt>Newly detected</dt>' $FILE | grep -Eo '[0-9]{1,4}') -ELIM=$(grep -i -B 1 '<dt>Eliminated</dt>' $FILE | grep -Eo '[0-9]{1,4}') -OUT=$(grep -i -B 1 '<dt>Outstanding</dt>' $FILE | grep -Eo '[0-9]{1,4}') - -#ls -lg $FILE -#cat $FILE - -if [ "${OUT}" == "0" ]; then - echo 'Current outstanding issues are zero' > $OUTPUT - echo "Newly detected: $NEW" >> $OUTPUT - echo "Eliminated: $ELIM" >> $OUTPUT - echo "More details can be found at https://scan.coverity.com/projects/fd-io-vpp/view_defects" >> $OUTPUT -else - echo "Current number of outstanding issues are $OUT Failing job" - echo "Current number of outstanding issues are $OUT" > $OUTPUT - echo "Newly detected: $NEW" >> $OUTPUT - echo "Eliminated: $ELIM" >> $OUTPUT - echo "More details can be found at https://scan.coverity.com/projects/fd-io-vpp/view_defects" >> $OUTPUT - exit 1 -fi diff --git a/jjb/scripts/vpp/csit-bisect.sh b/jjb/scripts/vpp/csit-bisect.sh new file mode 100644 index 000000000..0a264dbc8 --- /dev/null +++ b/jjb/scripts/vpp/csit-bisect.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash + +# Copyright (c) 2023 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" "bisect.sh" diff --git a/jjb/scripts/vpp/csit-device.sh b/jjb/scripts/vpp/csit-device.sh index af54c9dc4..989193001 100644..100755 --- a/jjb/scripts/vpp/csit-device.sh +++ b/jjb/scripts/vpp/csit-device.sh @@ -13,22 +13,25 @@ # See the License for the specific language governing permissions and # limitations under the License. +echo "---> jjb/scripts/vpp/csit-device.sh" + set -exuo pipefail # Clone CSIT git repository and proceed with entry script located there. # # Variables read: # - WORKSPACE - Jenkins workspace to create csit subdirectory in. +# - GIT_URL - Git clone URL # - 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 +git clone "${GIT_URL}/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 fetch --depth=1 "${GIT_URL}/csit" "${CSIT_REF}" git checkout FETCH_HEAD else git checkout HEAD diff --git a/jjb/scripts/vpp/csit-perf.sh b/jjb/scripts/vpp/csit-perf.sh index 17a9d39bc..ee0b500c6 100644..100755 --- a/jjb/scripts/vpp/csit-perf.sh +++ b/jjb/scripts/vpp/csit-perf.sh @@ -13,22 +13,25 @@ # See the License for the specific language governing permissions and # limitations under the License. +echo "---> jjb/scripts/vpp/csit-perf.sh" + set -exuo pipefail # Clone CSIT git repository and proceed with entry script located there. # # Variables read: # - WORKSPACE - Jenkins workspace to create csit subdirectory in. +# - GIT_URL - Git clone URL # - 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 +git clone "${GIT_URL}/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 fetch --depth=1 "${GIT_URL}/csit" "${CSIT_REF}" git checkout FETCH_HEAD else git checkout HEAD diff --git a/jjb/scripts/vpp/debug-build.sh b/jjb/scripts/vpp/debug-build.sh index cdf1d0760..68338df56 100644 --- a/jjb/scripts/vpp/debug-build.sh +++ b/jjb/scripts/vpp/debug-build.sh @@ -1,49 +1,78 @@ #!/bin/bash -# basic build script example -set -xe -o pipefail -OS_ID=$(grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g') -OS_VERSION_ID=$(grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g') +# Copyright (c) 2021 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. -echo OS_ID: $OS_ID -echo OS_VERSION_ID: $OS_VERSION_ID +echo "---> jjb/scripts/vpp/debug-build.sh" -# do nothing but print the current slave hostname -hostname - -echo "cat /etc/bootstrap.sha" -if [ -f /etc/bootstrap.sha ];then - cat /etc/bootstrap.sha -else - echo "Cannot find cat /etc/bootstrap.sha" -fi - -echo "cat /etc/bootstrap-functions.sha" -if [ -f /etc/bootstrap-functions.sha ];then - cat /etc/bootstrap-functions.sha -else - echo "Cannot find cat /etc/bootstrap-functions.sha" -fi - -echo "sha1sum of this script: ${0}" -sha1sum $0 +set -euxo pipefail +line="*************************************************************************" +OS_ID=$(grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g') +OS_VERSION_ID=$(grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g') +OS_ARCH=$(uname -m) +DRYRUN="${DRYRUN:-}" +MAKE_PARALLEL_JOBS="${MAKE_PARALLEL_JOBS:-}" +BUILD_RESULT="SUCCESSFULLY COMPLETED" +BUILD_ERROR="" +RETVAL="0" # run with ASAN on +# disable ASAN for now in the debug build - it's broken with PAPI +# in make test transitioning to unix sockets # export VPP_EXTRA_CMAKE_ARGS='-DVPP_ENABLE_SANITIZE_ADDR=ON' -# clang is not working with ASAN right now - see change 27268 -# apparently gcc neither... -# export CC=gcc - - - -make UNATTENDED=yes install-dep -make UNATTENDED=yes install-ext-deps -make UNATTENDED=yes build -make UNATTENDED=yes TEST_JOBS=auto test-debug +make_build_test_debug() { + if ! make UNATTENDED=yes install-dep ; then + BUILD_ERROR="FAILED 'make install-dep'" + return + fi + if ! make UNATTENDED=yes install-ext-deps ; then + BUILD_ERROR="FAILED 'make install-ext-deps'" + return + fi + if ! make UNATTENDED=yes build ; then + BUILD_ERROR="FAILED 'make build'" + return + fi + if grep -q "${OS_ID}-${OS_VERSION_ID}" <<< "${MAKE_TEST_OS}"; then + if [ -n "${MAKE_PARALLEL_JOBS}" ] ; then + TEST_JOBS="${MAKE_PARALLEL_JOBS}" + echo "Testing VPP with ${TEST_JOBS} cores." + else + TEST_JOBS="auto" + echo "Testing VPP with automatically calculated number of cores. " \ + "See test logs for the exact number." + fi + if ! make UNATTENDED=yes COMPRESS_FAILED_TEST_LOGS=yes \ + TEST_JOBS="$TEST_JOBS" test-debug ; then + BUILD_ERROR="FAILED 'make UNATTENDED=yes COMPRESS_FAILED_TEST_LOGS=yes TEST_JOBS=$TEST_JOBS test-debug'" + return + fi + else + echo "Skip running 'make test-debug' on ${OS_ID}-${OS_VERSION_ID}" + fi +} - -echo "*******************************************************************" -echo "* VPP debug/asan test BUILD SUCCESSFULLY COMPLETED" -echo "*******************************************************************" +# clang is not working with ASAN right now - see change 27268 +# also, it does not work with gcc-7, we need gcc-8 at least +# on ubuntu 20.04 executor the gcc is gcc9 +if [ "${DRYRUN,,}" != "true" ] ; then + make_build_test_debug +fi +if [ -n "$BUILD_ERROR" ] ; then + BUILD_RESULT="$BUILD_ERROR" + RETVAL="1" +fi +echo -e "\n$line\n* VPP ${OS_ID^^}-${OS_VERSION_ID}-${OS_ARCH^^} DEBUG BUILD $BUILD_RESULT\n$line\n" +exit $RETVAL diff --git a/jjb/scripts/vpp/docs.sh b/jjb/scripts/vpp/docs.sh index 608f8f979..52b920e31 100644..100755 --- a/jjb/scripts/vpp/docs.sh +++ b/jjb/scripts/vpp/docs.sh @@ -1,50 +1,29 @@ #!/bin/bash -set -xe -o pipefail -[ "$DOCS_REPO_URL" ] || DOCS_REPO_URL="https://nexus.fd.io/content/sites/site" -[ "$PROJECT_PATH" ] || PROJECT_PATH=io/fd/vpp -[ "$DOC_FILE" ] || DOC_FILE=vpp.docs.zip -[ "$DOC_DIR" ] || DOC_DIR=build-root/docs/html -[ "$SITE_DIR" ] || SITE_DIR=build-root/docs/deploy-site/ -[ "$RESOURCES_DIR" ] || RESOURCES_DIR=${SITE_DIR}/src/site/resources -[ "$MVN" ] || MVN="/opt/apache/maven/bin/mvn" -[ "$VERSION" ] || VERSION=$(./build-root/scripts/version rpm-version) -make doxygen +# Copyright (c) 2022 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. -if [[ ${JOB_NAME} == *merge* ]]; then - mkdir -p $(dirname ${RESOURCES_DIR}) - mv -f ${DOC_DIR} ${RESOURCES_DIR} - cd ${SITE_DIR} - find . -type f '(' -name '*.md5' -o -name '*.dot' -o -name '*.map' ')' -delete - cat > pom.xml << EOF - <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <groupId>io.fd.vpp</groupId> - <artifactId>docs</artifactId> - <version>1.0.0</version> - <packaging>pom</packaging> +echo "---> jjb/scripts/vpp/docs.sh" - <properties> - <generateReports>false</generateReports> - </properties> +set -euxo pipefail - <build> - <extensions> - <extension> - <groupId>org.apache.maven.wagon</groupId> - <artifactId>wagon-webdav-jackrabbit</artifactId> - <version>2.10</version> - </extension> - </extensions> - </build> - <distributionManagement> - <site> - <id>fdio-site</id> - <url>dav:${DOCS_REPO_URL}/${PROJECT_PATH}/${VERSION}</url> - </site> - </distributionManagement> - </project> -EOF - ${MVN} -B site:site site:deploy -gs "${GLOBAL_SETTINGS_FILE}" -s "${SETTINGS_FILE}" -T 4C - cd - +line="*************************************************************************" +# Don't build anything if this is a merge job being run when +# the git HEAD id is not the same as the Gerrit New Revision id. +if [[ ${JOB_NAME} == *merge* ]] && [ -n "${GERRIT_NEWREV:-}" ] && + [ "$GERRIT_NEWREV" != "$GIT_COMMIT" ] ; then + echo -e "\n$line\nSkipping docs build. A newer patch has been merged.\n$line\n" + exit 0 fi + +make UNATTENDED=yes docs diff --git a/jjb/scripts/vpp/docs_spell.sh b/jjb/scripts/vpp/docs_spell.sh new file mode 100755 index 000000000..4b6a97851 --- /dev/null +++ b/jjb/scripts/vpp/docs_spell.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# Copyright (c) 2022 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. + +echo "---> jjb/scripts/vpp/docs_spell.sh" + +if grep -qE '^docs\-%' Makefile && grep -qE '^spell' docs/Makefile +then + make docs-spell +else + echo "Can't find docs-spell target in Makefile - skipping docs-spell" +fi diff --git a/jjb/scripts/vpp/dpdk-rdma-version-mismatch.sh b/jjb/scripts/vpp/dpdk-rdma-version-mismatch.sh new file mode 100644 index 000000000..b2248064b --- /dev/null +++ b/jjb/scripts/vpp/dpdk-rdma-version-mismatch.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +# Copyright (c) 2022 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. + +echo "---> jjb/scripts/vpp/dpdk-rdma-version-mismatch.sh" + +set -euxo pipefail + +line="*************************************************************************" +EXTERNAL_BUILD_DIR="$WORKSPACE/build/external" +RETVAL="0" +MISMATCH_RESULT="INCLUDED IN" + +make -C "$EXTERNAL_BUILD_DIR" build-deb +source "$EXTERNAL_BUILD_DIR/dpdk_mlx_default.sh" || true + +if [ "${DPDK_MLX_DEFAULT-}" = "n" ] ; then + MISMATCH_RESULT="MISSING FROM" + RETVAL="1" +fi +echo -e "\n$line\n* MLX DPDK DRIVER $MISMATCH_RESULT VPP-EXT-DEPS PACKAGE\n$line\n" +exit $RETVAL diff --git a/jjb/scripts/vpp/gcc-build.sh b/jjb/scripts/vpp/gcc-build.sh new file mode 100644 index 000000000..9bd6d4ff7 --- /dev/null +++ b/jjb/scripts/vpp/gcc-build.sh @@ -0,0 +1,78 @@ +#!/bin/bash + +# Copyright (c) 2022 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. + +echo "---> jjb/scripts/vpp/gcc-build.sh" + +set -euxo pipefail + +line="*************************************************************************" +OS_ID=$(grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g') +OS_VERSION_ID=$(grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g') +OS_ARCH=$(uname -m) +DRYRUN="${DRYRUN:-}" +BUILD_RESULT="SUCCESSFULLY COMPLETED" +BUILD_ERROR="" +RETVAL="0" +export CC=gcc + +make_build_release_build_test_gcov_sanity() { + if ! make UNATTENDED=yes install-dep ; then + BUILD_ERROR="FAILED 'make install-dep'" + return + fi + if ! make UNATTENDED=yes install-ext-deps ; then + BUILD_ERROR="FAILED 'make install-ext-deps'" + return + fi + if ! make UNATTENDED=yes CCACHE_DISABLE=1 build-release ; then + BUILD_ERROR="FAILED 'make build-release'" + return + fi + if ! make UNATTENDED=yes CCACHE_DISABLE=1 build ; then + BUILD_ERROR="FAILED 'make build'" + return + fi + if [ -n "${MAKE_PARALLEL_JOBS}" ] ; then + TEST_JOBS="${MAKE_PARALLEL_JOBS}" + echo "Testing VPP with ${TEST_JOBS} cores." + else + TEST_JOBS="auto" + echo "Testing VPP with automatically calculated number of cores. " \ + "See test logs for the exact number." + fi + # TODO: Add 'smoke test' env var to select smoke test cases + # then update this accordingly. For now pick a few basic suites... + MAKE_TEST_SUITES="vlib vppinfra vpe_api vapi cli bihash" + for suite in $MAKE_TEST_SUITES ; do + if ! make UNATTENDED=yes CCACHE_DISABLE=1 TESTS_GCOV=1 TEST_JOBS="$TEST_JOBS" TEST=$suite test ; then + BUILD_ERROR="FAILED 'make TEST=$suite test'!" + return + fi + if ! make UNATTENDED=yes CCACHE_DISABLE=1 TESTS_GCOV=1 TEST_JOBS="$TEST_JOBS" TEST=$suite test-debug ; then + BUILD_ERROR="FAILED 'make TEST=$suite test-debug'!" + return + fi + done +} + +if [ "${DRYRUN,,}" != "true" ] ; then + make_build_release_build_test_gcov_sanity +fi +if [ -n "$BUILD_ERROR" ] ; then + BUILD_RESULT="$BUILD_ERROR" + RETVAL="1" +fi +echo -e "\n$line\n* VPP ${OS_ID^^}-${OS_VERSION_ID}-${OS_ARCH^^} GCC BUILD $BUILD_RESULT\n$line\n" +exit $RETVAL diff --git a/jjb/scripts/vpp/make-test-docs.sh b/jjb/scripts/vpp/make-test-docs.sh deleted file mode 100644 index 1f82ab502..000000000 --- a/jjb/scripts/vpp/make-test-docs.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash -set -xe -o pipefail -[ "$DOCS_REPO_URL" ] || DOCS_REPO_URL="https://nexus.fd.io/content/sites/site" -[ "$PROJECT_PATH" ] || PROJECT_PATH=io/fd/vpp -[ "$DOC_DIR" ] || DOC_DIR=build-root/build-test/doc/html -[ "$SITE_DIR" ] || SITE_DIR=build-root/docs/deploy-site -[ "$RESOURCES_DIR" ] || RESOURCES_DIR=${SITE_DIR}/src/site/resources/vpp_make_test -[ "$MVN" ] || MVN="/opt/apache/maven/bin/mvn" -[ "$VERSION" ] || VERSION=$(./build-root/scripts/version rpm-version) - -make test-doc - -if [[ ${JOB_NAME} == *merge* ]]; then - mkdir -p ${RESOURCES_DIR} - mv -f ${DOC_DIR} ${RESOURCES_DIR} - cd ${SITE_DIR} - - cat > pom.xml << EOF - <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <groupId>io.fd.vpp</groupId> - <artifactId>docs</artifactId> - <version>1.0.0</version> - <packaging>pom</packaging> - - <properties> - <generateReports>false</generateReports> - </properties> - - <build> - <extensions> - <extension> - <groupId>org.apache.maven.wagon</groupId> - <artifactId>wagon-webdav-jackrabbit</artifactId> - <version>2.10</version> - </extension> - </extensions> - </build> - <distributionManagement> - <site> - <id>fdio-site</id> - <url>dav:${DOCS_REPO_URL}/${PROJECT_PATH}/${VERSION}</url> - </site> - </distributionManagement> - </project> -EOF - ${MVN} -B site:site site:deploy -gs "${GLOBAL_SETTINGS_FILE}" -s "${SETTINGS_FILE}" -T 4C - cd - -fi diff --git a/jjb/scripts/vpp/maven-push.sh b/jjb/scripts/vpp/maven-push.sh deleted file mode 100644 index 6ce3b2c06..000000000 --- a/jjb/scripts/vpp/maven-push.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/bash -set -xe -o pipefail -echo "*******************************************************************" -echo "* STARTING PUSH OF PACKAGES TO REPOS" -echo "* NOTHING THAT HAPPENS BELOW THIS POINT IS RELATED TO BUILD FAILURE" -echo "*******************************************************************" - -[ "$MVN" ] || MVN="/opt/apache/maven/bin/mvn" -GROUP_ID="io.fd.${PROJECT}" -BASEURL="${NEXUSPROXY}/content/repositories/fd.io." -BASEREPOID='fdio-' - -if [ "${OS}" == "ubuntu1604" ]; then - # Find the files - JARS=$(find . -type f -iname '*.jar') - DEBS=$(find . -type f -iname '*.deb') - for i in $JARS - do - push_jar "$i" - done - - for i in $DEBS - do - push_deb "$i" - done -elif [ "${OS}" == "ubuntu1804" ]; then - # Find the files - JARS=$(find . -type f -iname '*.jar') - DEBS=$(find . -type f -iname '*.deb') - for i in $JARS - do - push_jar "$i" - done - - for i in $DEBS - do - push_deb "$i" - done -elif [ "${OS}" == "centos7" ]; then - # Find the files - RPMS=$(find . -type f -iname '*.rpm') - SRPMS=$(find . -type f -iname '*.srpm') - SRCRPMS=$(find . -type f -name '*.src.rpm') - for i in $RPMS $SRPMS $SRCRPMS - do - push_rpm "$i" - done -elif [ "${OS}" == "opensuse" ]; then - # Find the files - RPMS=$(find . -type f -iname '*.rpm') - for i in $RPMS - do - push_rpm "$i" - done -fi -# vim: ts=4 sw=4 sts=4 et ft=sh : diff --git a/jjb/scripts/vpp/sphinx-docs.sh b/jjb/scripts/vpp/sphinx-docs.sh deleted file mode 100644 index 749728731..000000000 --- a/jjb/scripts/vpp/sphinx-docs.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash -set -xe -o pipefail -[ "$DOCS_REPO_URL" ] || DOCS_REPO_URL="https://nexus.fd.io/content/sites/site" -[ "$PROJECT_PATH" ] || PROJECT_PATH=io/fd/vpp -[ "$DOC_FILE" ] || DOC_FILE=vpp.docs.zip -[ "$DOC_DIR" ] || DOC_DIR=./docs/_build/html -[ "$SITE_DIR" ] || SITE_DIR=build-root/docs/deploy-site -[ "$RESOURCES_DIR" ] || RESOURCES_DIR=${SITE_DIR}/src/site/resources -[ "$MVN" ] || MVN="/opt/apache/maven/bin/mvn" -[ "$VERSION" ] || VERSION=$(./build-root/scripts/version rpm-version) - -make docs-venv -CONFIRM=-y FORCE=--force-yes make docs - -if [[ ${JOB_NAME} == *merge* ]]; then - mkdir -p $(dirname ${RESOURCES_DIR}) - mv -f ${DOC_DIR} ${RESOURCES_DIR} - cd ${SITE_DIR} - cat > pom.xml << EOF - <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <groupId>io.fd.vpp</groupId> - <artifactId>docs</artifactId> - <version>1.0.0</version> - <packaging>pom</packaging> - - <properties> - <generateReports>false</generateReports> - </properties> - - <build> - <extensions> - <extension> - <groupId>org.apache.maven.wagon</groupId> - <artifactId>wagon-webdav-jackrabbit</artifactId> - <version>2.10</version> - </extension> - </extensions> - </build> - <distributionManagement> - <site> - <id>fdio-site</id> - <url>dav:${DOCS_REPO_URL}/${PROJECT_PATH}/v${VERSION}</url> - </site> - </distributionManagement> - </project> -EOF - ${MVN} -B site:site site:deploy -gs "${GLOBAL_SETTINGS_FILE}" -s "${SETTINGS_FILE}" -T 4C - cd - -fi diff --git a/jjb/scripts/vpp/test-checkstyle.sh b/jjb/scripts/vpp/test-checkstyle.sh index bdc843114..3f0bc9a06 100644 --- a/jjb/scripts/vpp/test-checkstyle.sh +++ b/jjb/scripts/vpp/test-checkstyle.sh @@ -1,5 +1,19 @@ #!/bin/bash -# jjb/vpp/include-raw-vpp-test-checkstyle.sh + +# Copyright (c) 2020 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. + +echo "---> jjb/scripts/vpp/test-checkstyle.sh" if [ -n "$(grep -E '^test-checkstyle:' Makefile)" ] then |