diff options
Diffstat (limited to 'jjb/scripts')
-rw-r--r-- | jjb/scripts/cicn/build-libparc.sh | 8 | ||||
-rw-r--r-- | jjb/scripts/cicn/build-viper.sh | 8 | ||||
-rw-r--r-- | jjb/scripts/cicn/docs-libparc.sh | 38 | ||||
-rw-r--r-- | jjb/scripts/hicn/build-extras.sh | 7 | ||||
-rw-r--r-- | jjb/scripts/hicn/build.sh | 7 | ||||
-rw-r--r-- | jjb/scripts/hicn/checkstyle.sh | 7 | ||||
-rw-r--r-- | jjb/scripts/hicn/docs.sh | 18 | ||||
-rwxr-xr-x | jjb/scripts/publish_docs.sh | 5 | ||||
-rw-r--r-- | jjb/scripts/setup_jvpp_dev_env.sh | 74 |
9 files changed, 98 insertions, 74 deletions
diff --git a/jjb/scripts/cicn/build-libparc.sh b/jjb/scripts/cicn/build-libparc.sh new file mode 100644 index 000000000..967670e3b --- /dev/null +++ b/jjb/scripts/cicn/build-libparc.sh @@ -0,0 +1,8 @@ +#!/bin/bash +echo "---> jjb/scripts/cicn/build-libparc.sh" +set -euxo pipefail +IFS=$'\n\t' + +pushd libparc/scripts +bash build-package.sh +popd diff --git a/jjb/scripts/cicn/build-viper.sh b/jjb/scripts/cicn/build-viper.sh new file mode 100644 index 000000000..38018b779 --- /dev/null +++ b/jjb/scripts/cicn/build-viper.sh @@ -0,0 +1,8 @@ +#!/bin/bash +echo "---> jjb/scripts/cicn/build-viper.sh" +set -euxo pipefail +IFS=$'\n\t' + +pushd scripts +bash build-package.sh +popd diff --git a/jjb/scripts/cicn/docs-libparc.sh b/jjb/scripts/cicn/docs-libparc.sh new file mode 100644 index 000000000..0ca4effb9 --- /dev/null +++ b/jjb/scripts/cicn/docs-libparc.sh @@ -0,0 +1,38 @@ +#!/bin/bash +echo "---> jjb/scripts/cicn/docs-libparc.sh" +set -xe -o pipefail + +update_cmake_repo() { + cat /etc/resolv.conf + echo "nameserver 8.8.8.8" | sudo tee -a /etc/resolv.conf + cat /etc/resolv.conf + + CMAKE_INSTALL_SCRIPT_URL="https://cmake.org/files/v3.8/cmake-3.8.0-Linux-x86_64.sh" + CMAKE_INSTALL_SCRIPT="/tmp/install_cmake.sh" + curl ${CMAKE_INSTALL_SCRIPT_URL} > ${CMAKE_INSTALL_SCRIPT} + + sudo mkdir -p /opt/cmake + sudo bash ${CMAKE_INSTALL_SCRIPT} --skip-license --prefix=/opt/cmake + export PATH=/opt/cmake/bin:$PATH +} + +cd libparc + +[ "$DOC_DIR" ] || DOC_DIR="build/documentation/generated-documentation/html" +[ "$SITE_DIR" ] || SITE_DIR="build/documentation/deploy-site/" +[ "$RESOURCES_DIR" ] || RESOURCES_DIR=${SITE_DIR}/src/site/resources + +update_cmake_repo +mkdir -p build +pushd build +cmake -DDOC_ONLY=ON .. +make documentation +popd + +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 + cd - +fi diff --git a/jjb/scripts/hicn/build-extras.sh b/jjb/scripts/hicn/build-extras.sh new file mode 100644 index 000000000..bcf913be0 --- /dev/null +++ b/jjb/scripts/hicn/build-extras.sh @@ -0,0 +1,7 @@ +#!/bin/bash +# basic build script example +set -euxo pipefail + +pushd scripts +bash ./build-extras.sh +popd diff --git a/jjb/scripts/hicn/build.sh b/jjb/scripts/hicn/build.sh new file mode 100644 index 000000000..e1d20a48e --- /dev/null +++ b/jjb/scripts/hicn/build.sh @@ -0,0 +1,7 @@ +#!/bin/bash +# basic build script example +set -euxo pipefail + +pushd scripts +bash ./build-packages.sh +popd diff --git a/jjb/scripts/hicn/checkstyle.sh b/jjb/scripts/hicn/checkstyle.sh new file mode 100644 index 000000000..636590e7a --- /dev/null +++ b/jjb/scripts/hicn/checkstyle.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +if [ -f ./scripts/checkstyle.sh ];then + bash scripts/checkstyle.sh +else + echo "Cannot find scripts/checkstyle.sh - skipping checkstyle" +fi diff --git a/jjb/scripts/hicn/docs.sh b/jjb/scripts/hicn/docs.sh new file mode 100644 index 000000000..f44b93dd1 --- /dev/null +++ b/jjb/scripts/hicn/docs.sh @@ -0,0 +1,18 @@ +#!/bin/bash +set -xe -o pipefail + +DOXYGEN_DOC_DIR="build-doxygen/docs/doxygen/html" +DOC_DIR="docs/build/html" +SITE_DIR="build/doc/deploy-site" + +echo "---> jjb/scripts/hicn/docs.sh" + +bash scripts/build-packages.sh sphinx +bash scripts/build-packages.sh doxygen + +if [[ "${JOB_NAME}" == *merge* ]]; then + mkdir -p "${SITE_DIR}"/doxygen + mv -f "${DOC_DIR}" "${SITE_DIR}" + mv -f "${DOXYGEN_DOC_DIR}" "${SITE_DIR}"/doxygen + find "${SITE_DIR}" -type f '(' -name '*.md5' -o -name '*.dot' -o -name '*.map' ')' -delete +fi diff --git a/jjb/scripts/publish_docs.sh b/jjb/scripts/publish_docs.sh index 841789d82..adc179668 100755 --- a/jjb/scripts/publish_docs.sh +++ b/jjb/scripts/publish_docs.sh @@ -38,6 +38,11 @@ if [[ ${JOB_NAME} == *merge* ]]; then workspace_dir="${WORKSPACE}/resources/tools/doc_gen/_build" bucket_path="/csit/${GERRIT_BRANCH}/docs/" ;; + *"hicn-docs"*) + hicn_release="$(git describe --long --match "v*" | cut -d- -f1 | sed -e 's/^v//')" + workspace_dir="${WORKSPACE}/build/doc/deploy-site" + bucket_path="/hicn/${hicn_release}/" + ;; *"vpp-docs"*) vpp_release="$(${WORKSPACE}/build-root/scripts/version rpm-version)" # TODO: Remove conditional statement when stable/2106 and diff --git a/jjb/scripts/setup_jvpp_dev_env.sh b/jjb/scripts/setup_jvpp_dev_env.sh deleted file mode 100644 index c489a547f..000000000 --- a/jjb/scripts/setup_jvpp_dev_env.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/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/setup_jvpp_dev_env.sh" - -set -e -o pipefail - -# Figure out what system we are running on -if [[ -f /etc/lsb-release ]];then - . /etc/lsb-release -elif [[ -f /etc/redhat-release ]];then - sudo yum install -y redhat-lsb - DISTRIB_ID=`lsb_release -si` - DISTRIB_RELEASE=`lsb_release -sr` - DISTRIB_CODENAME=`lsb_release -sc` - DISTRIB_DESCRIPTION=`lsb_release -sd` -fi -echo DISTRIB_ID: $DISTRIB_ID -echo DISTRIB_RELEASE: $DISTRIB_RELEASE -echo DISTRIB_CODENAME: $DISTRIB_CODENAME -echo DISTRIB_DESCRIPTION: $DISTRIB_DESCRIPTION - -JVPP_VERSION=`./version` -echo JVPP_VERSION: $JVPP_VERSION -# Check release version -if [[ "$JVPP_VERSION" == *"-release" ]]; then - # at the time when JVPP release packages are being build, - # vpp release packages are already promoted to release repository. - # Therefore we need to switch to release repository in order to download - # correct vpp package versions - STREAM="release" -fi - -function setup { - if ! [[ -z ${REPO_NAME} ]]; then - echo "INSTALLING VPP-DPKG-DEV from apt/yum repo" - REPO_URL="https://packagecloud.io/fdio/${STREAM}" - echo "REPO_URL: ${REPO_URL}" - # Setup by installing vpp-dev and vpp-lib - if [[ "$DISTRIB_ID" == "Ubuntu" ]]; then - if ! [[ "${STREAM}" == "master" ]]; then - echo "stable branch - clearing all fdio repos. new one will be installed." - sudo rm -f /etc/apt/sources.list.d/fdio_*.list - fi - if [[ -f /etc/apt/sources.list.d/99fd.io.list ]];then - echo "Deleting: /etc/apt/sources.list.d/99fd.io.list" - sudo rm /etc/apt/sources.list.d/99fd.io.list - fi - curl -s https://packagecloud.io/install/repositories/fdio/${STREAM}/script.deb.sh | sudo bash - sudo apt-get -y --force-yes install libvppinfra libvppinfra-dev vpp vpp-dev vpp-plugin-core || true - elif [[ "$DISTRIB_ID" == "CentOS" ]]; then - if [[ -f /etc/yum.repos.d/fdio-master.repo ]]; then - echo "Deleting: /etc/yum.repos.d/fdio-master.repo" - sudo rm /etc/yum.repos.d/fdio-master.repo - fi - curl -s https://packagecloud.io/install/repositories/fdio/${STREAM}/script.rpm.sh | sudo bash - sudo yum -y install vpp-devel vpp-lib vpp-plugins || true - fi - fi -} - -setup |