set -exuo pipefail
+if [[ "${SILO}" != "production" ]] ; then
+ echo "WARNING: Doc upload not supported on Jenkins '${SILO}'..."
+ exit 0
+fi
+
CDN_URL="s3-docs.fd.io"
if [[ ${JOB_NAME} == *merge* ]]; then
workspace_dir="${WORKSPACE}/resources/tools/doc_gen/_build"
bucket_path="/csit/${GERRIT_BRANCH}/docs/"
;;
+ *"vpp-docs"*)
+ vpp_release="$(${WORKSPACE}/build-root/scripts/version rpm-version)"
+ # TODO: Remove conditional statement when stable/2106 and
+ # stable/2110 are no longer supported
+ if [[ "${vpp_release::2}" -ge "22" ]] ; then
+ workspace_dir="${WORKSPACE}/build-root/docs/html"
+ else
+ workspace_dir="${WORKSPACE}/docs/_build/html"
+ fi
+ bucket_path="/vpp/${vpp_release}/"
+ ;;
+ # TODO: Remove 'vpp-make-test-docs' when stable/2106 and
+ # stable/2110 are no longer supported
+ *"vpp-make-test-docs"*)
+ vpp_release="$(${WORKSPACE}/build-root/scripts/version rpm-version)"
+ workspace_dir="${WORKSPACE}/test/doc/build/html"
+ bucket_path="/vpp/${vpp_release}/vpp_make_test/html/"
+ ;;
*)
die "Unknown job: ${JOB_NAME}"
esac
terraform apply -no-color -auto-approve
popd
- echo "S3 docs: <a href=\"https://$CDN_URL/$bucket_path\">https://$CDN_URL/$bucket_path</a>"
+ echo "S3 docs: <a href=\"https://${CDN_URL}${bucket_path}\">https://${CDN_URL}${bucket_path}</a>"
fi
# 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 doxygen docs build. A newer patch has been merged.\n$line\n"
+ echo -e "\n$line\nSkipping docs build. A newer patch has been merged.\n$line\n"
exit 0
fi
-
-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
-
-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>
-
- <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 -
+# TODO: Remove conditional statement when stable/2106 and stable/2110 are no
+# longer supported
+vpp_release="$(${WORKSPACE}/build-root/scripts/version rpm-version)"
+if [[ "${vpp_release::2}" -ge "22" ]] ; then
+ CONFIRM=-y FORCE=--force-yes make docs
+else
+ CONFIRM=-y FORCE=--force-yes make docs-venv docs
fi
set -euxo pipefail
+# TODO: Remove this file when stable/2106 and stable/2110 are no longer
+# supported as 'make test-doc' is deprecated in master (VPP 22.02)
+
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 'make test' doxygen docs build. A newer patch has been merged.\n$line\n"
+ echo -e "\n$line\nSkipping 'make test' docs build. A newer patch has been merged.\n$line\n"
exit 0
fi
-DOCS_REPO_URL=${DOCS_REPO_URL:-"https://nexus.fd.io/content/sites/site"}
-PROJECT_PATH=${PROJECT_PATH:-"io/fd/vpp"}
-DOC_DIR=${DOC_DIR:-"test/doc/build/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)"}
-
-if [[ ${JOB_NAME} == *2009* ]] || [[ ${JOB_NAME} == *2101* ]] ; then
- DOC_DIR="build-root/build-test/doc/html"
-fi
-
make test-doc
-
-if [[ ${JOB_NAME} == *merge* ]]; then
- mkdir -p ${RESOURCES_DIR}
- mv -f ${DOC_DIR} ${RESOURCES_DIR}
- ls -alR ${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
+++ /dev/null
-#!/bin/bash
-
-# 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 "---> jjb/scripts/vpp/sphinx-docs.sh"
-
-set -euxo pipefail
-
-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 sphinx docs build. A newer patch has been merged.\n$line\n"
- exit 0
-fi
-
-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
jobs:
- 'vpp-docs-merge-{stream}-{os}-{executor-arch}'
- 'vpp-docs-verify-{stream}-{os}-{executor-arch}'
- - 'vpp-make-test-docs-merge-{stream}-{os}-{executor-arch}'
- - 'vpp-make-test-docs-verify-{stream}-{os}-{executor-arch}'
project: 'vpp'
executor-arch: 'x86_64'
+ os: 'ubuntu2004'
stream:
- master:
branch: 'master'
branch-refspec: ''
- os: 'ubuntu2004'
- '2009':
branch: 'stable/2009'
branch-refspec: ''
- os: 'ubuntu1804'
- '2101':
branch: 'stable/2101'
branch-refspec: ''
- os: 'ubuntu1804'
- '2106':
branch: 'stable/2106'
branch-refspec: ''
- os: 'ubuntu1804'
- '2110':
branch: 'stable/2110'
branch-refspec: ''
- os: 'ubuntu1804'
+
+# TODO: Remove when stable/2106 and stable/2110 are no longer supported.
+- project:
+ name: make-test-docs
+ jobs:
+ - 'vpp-make-test-docs-merge-{stream}-{os}-{executor-arch}'
+ - 'vpp-make-test-docs-verify-{stream}-{os}-{executor-arch}'
+
+ project: 'vpp'
+ executor-arch: 'x86_64'
+ os: 'ubuntu2004'
+
+ stream:
+ - '2106':
+ branch: 'stable/2106'
+ branch-refspec: ''
+ - '2110':
+ branch: 'stable/2110'
+ branch-refspec: ''
- job-template:
name: 'vpp-docs-verify-{stream}-{os}-{executor-arch}'
branch: '{branch}'
- os-parameter:
os: '{os}'
- - maven-exec:
- maven-version: 'mvn33-new'
- stream-parameter:
stream: '{stream}'
- gerrit-refspec-parameter:
branch: '{branch}'
builders:
- - maven-target:
- maven-version: 'mvn33-new'
- goals: '--version'
- settings: 'vpp-settings'
- settings-type: cfp
- global-settings: 'global-settings'
- global-settings-type: cfp
- - provide-maven-settings:
- settings-file: 'vpp-settings'
- global-settings-file: 'global-settings'
- shell:
!include-raw-escape:
- ../scripts/setup_executor_env.sh
- shell:
!include-raw-escape:
- ../scripts/vpp/docs.sh
- - shell:
- !include-raw-escape:
- - ../scripts/vpp/sphinx-docs.sh
publishers:
- fdio-infra-publish
branch: '{branch}'
- os-parameter:
os: '{os}'
- - maven-exec:
- maven-version: 'mvn33-new'
- stream-parameter:
stream: '{stream}'
notbuilt: true
builders:
- - maven-target:
- maven-version: 'mvn33-new'
- goals: '--version'
- settings: 'vpp-settings'
- settings-type: cfp
- global-settings: 'global-settings'
- global-settings-type: cfp
- - provide-maven-settings:
- settings-file: 'vpp-settings'
- global-settings-file: 'global-settings'
- shell:
!include-raw-escape:
- ../scripts/setup_executor_env.sh
- ../scripts/vpp/docs.sh
publishers:
+ - fdio-infra-publish-docs
- fdio-infra-publish
branch: '{branch}'
- os-parameter:
os: '{os}'
- - maven-exec:
- maven-version: 'mvn33-new'
- stream-parameter:
stream: '{stream}'
- gerrit-refspec-parameter:
branch: '{branch}'
builders:
- - maven-target:
- maven-version: 'mvn33-new'
- goals: '--version'
- settings: 'vpp-settings'
- settings-type: cfp
- global-settings: 'global-settings'
- global-settings-type: cfp
- - provide-maven-settings:
- settings-file: 'vpp-settings'
- global-settings-file: 'global-settings'
- shell:
!include-raw-escape:
- ../scripts/setup_executor_env.sh
branch: '{branch}'
- os-parameter:
os: '{os}'
- - maven-exec:
- maven-version: 'mvn33-new'
- stream-parameter:
stream: '{stream}'
notbuilt: true
builders:
- - maven-target:
- maven-version: 'mvn33-new'
- goals: '--version'
- settings: 'vpp-settings'
- settings-type: cfp
- global-settings: 'global-settings'
- global-settings-type: cfp
- - provide-maven-settings:
- settings-file: 'vpp-settings'
- global-settings-file: 'global-settings'
- shell:
!include-raw-escape:
- ../scripts/setup_executor_env.sh
- ../scripts/vpp/make-test-docs.sh
publishers:
+ - fdio-infra-publish-docs
- fdio-infra-publish
jobs:
- 'vpp-checkstyle-verify-{stream}-{os}-{executor-arch}'
project: 'vpp'
+ os: 'ubuntu2004'
stream:
- master:
branch: 'master'
branch-refspec: ''
- os: 'ubuntu2004'
- repo-stream-part: 'master'
- '2009':
branch: 'stable/2009'
branch-refspec: ''
- os: 'ubuntu1804'
- repo-stream-part: 'stable.2009'
- os: 'ubuntu1804'
- '2101':
branch: 'stable/2101'
branch-refspec: ''
- os: 'ubuntu1804'
- repo-stream-part: 'stable.2101'
- '2106':
branch: 'stable/2106'
branch-refspec: ''
- os: 'ubuntu1804'
- repo-stream-part: 'stable.2106'
- '2110':
branch: 'stable/2110'
branch-refspec: ''
- os: 'ubuntu1804'
- repo-stream-part: 'stable.2110'
executor-arch: 'x86_64'
# [end] VPP-CHECKSTYLE-X86_64 PROJECT
- master:
branch: 'master'
branch-refspec: ''
- repo-stream-part: 'master'
- '2009':
branch: 'stable/2009'
branch-refspec: ''
make-test-os: 'ubuntu-18.04'
- repo-stream-part: 'stable.2009'
- '2101':
branch: 'stable/2101'
branch-refspec: ''
make-test-os: 'ubuntu-18.04'
- repo-stream-part: 'stable.2101'
- '2106':
branch: 'stable/2106'
branch-refspec: ''
- repo-stream-part: 'stable.2106'
- '2110':
branch: 'stable/2110'
branch-refspec: ''
- repo-stream-part: 'stable.2110'
os:
- - centos7:
- repo-os-part: 'centos7'
- - centos8:
- repo-os-part: 'centos8'
- - debian9:
- repo-os-part: 'stretch'
- - debian10:
- repo-os-part: 'buster'
- - ubuntu1804:
- repo-os-part: 'ubuntu.bionic.main'
- - ubuntu2004:
- repo-os-part: 'ubuntu.focal.main'
+ - centos7
+ - centos8
+ - debian9
+ - debian10
+ - ubuntu1804
+ - ubuntu2004
executor-arch: 'x86_64'
exclude:
# OS deprecated in master
branch-refspec: ''
# Once per hour
periodicity: 'H * * * *'
- repo-stream-part: 'master'
- - '2009':
- branch: 'stable/2009'
- branch-refspec: ''
- make-test-os: 'ubuntu-18.04'
- # Once per day
- periodicity: 'H H * * *'
- repo-stream-part: 'stable.2009'
- os:
- - ubuntu2004:
- repo-os-part: 'ubuntu.focal.main'
+ os: 'ubuntu2004'
executor-arch: 'x86_64'
# [end] VPP-DEBUG-X86_64 PROJECT
- 'vpp-gcc-verify-{stream}-{os}-{executor-arch}'
project: 'vpp'
executor-arch: 'x86_64'
- os:
- - ubuntu2004:
- repo-os-part: 'ubuntu.focal.main'
+ os: 'ubuntu2004'
stream:
- master:
branch: 'master'
branch-refspec: ''
- repo-stream-part: 'master'
- '2009':
branch: 'stable/2009'
branch-refspec: ''
- repo-stream-part: 'stable.2009'
- '2101':
branch: 'stable/2101'
branch-refspec: ''
- repo-stream-part: 'stable.2101'
- '2106':
branch: 'stable/2106'
branch-refspec: ''
- repo-stream-part: 'stable.2106'
- '2110':
branch: 'stable/2110'
branch-refspec: ''
- repo-stream-part: 'stable.2110'
# [end] VPP-GCC-X86_64 PROJECT
# VPP-AARCH64 PROJECT
- master:
branch: 'master'
branch-refspec: ''
- repo-stream-part: 'master'
- '2009':
branch: 'stable/2009'
branch-refspec: ''
make-test-os: 'ubuntu-18.04'
- repo-stream-part: 'stable.2009'
- '2101':
branch: 'stable/2101'
branch-refspec: ''
make-test-os: 'ubuntu-18.04'
- repo-stream-part: 'stable.2101'
- '2106':
branch: 'stable/2106'
branch-refspec: ''
- repo-stream-part: 'stable.2106'
- '2110':
branch: 'stable/2110'
branch-refspec: ''
- repo-stream-part: 'stable.2110'
os:
- - centos8:
- repo-os-part: 'centos8'
- - ubuntu1804:
- repo-os-part: 'ubuntu-arm.bionic.main'
- - ubuntu2004:
- repo-os-part: 'ubuntu.focal.main'
+ - centos8
+ - ubuntu1804
+ - ubuntu2004
executor-arch: 'aarch64'
exclude:
# OS deprecated in master
- master:
branch: 'master'
branch-refspec: ''
- repo-stream-part: 'master'
- '2009':
branch: 'stable/2009'
branch-refspec: ''
- repo-stream-part: 'stable.2009'
- '2101':
branch: 'stable/2101'
branch-refspec: ''
- repo-stream-part: 'stable.2101'
- '2106':
branch: 'stable/2106'
branch-refspec: ''
- repo-stream-part: 'stable.2106'
- '2110':
branch: 'stable/2110'
branch-refspec: ''
- repo-stream-part: 'stable.2110'
testbed-arch:
- 1n-skx:
os: 'ubuntu2004'
- master:
branch: 'master'
branch-refspec: ''
- repo-stream-part: 'master'
- '2009':
branch: 'stable/2009'
branch-refspec: ''
- repo-stream-part: 'stable.2009'
- '2101':
branch: 'stable/2101'
branch-refspec: ''
- repo-stream-part: 'stable.2101'
- '2106':
branch: 'stable/2106'
branch-refspec: ''
- repo-stream-part: 'stable.2106'
- '2110':
branch: 'stable/2110'
branch-refspec: ''
- repo-stream-part: 'stable.2110'
testbed-arch:
- 2n-clx:
os: 'ubuntu2004'
- '2009':
branch: 'stable/2009'
branch-refspec: ''
- repo-stream-part: 'stable.2009'
- '2101':
branch: 'stable/2101'
branch-refspec: ''
- repo-stream-part: 'stable.2101'
- '2106':
branch: 'stable/2106'
branch-refspec: ''
- repo-stream-part: 'stable.2106'
- '2110':
branch: 'stable/2110'
branch-refspec: ''
- repo-stream-part: 'stable.2110'
- os: ubuntu2004
+ os: 'ubuntu2004'
# [end] VPP-CSIT-API-CRC PROJECT
# LF RELENG VPP PROJECTS
os: '{os}'
- project-parameter:
project: '{project}'
- - repo-name-parameter:
- repo-name: '{repo-stream-part}.ubuntu.bionic.main'
scm:
- gerrit-trigger-scm:
os: '{os}'
- project-parameter:
project: '{project}'
- - repo-name-parameter:
- repo-name: '{repo-stream-part}.{repo-os-part}'
- stream-parameter:
stream: '{stream}'
os: 'ubuntu1804'
- project-parameter:
project: '{project}'
- - repo-name-parameter:
- repo-name: '{repo-stream-part}.ubuntu.bionic.main'
- stream-parameter:
stream: '{stream}'
os: '{os}'
- project-parameter:
project: '{project}'
- - repo-name-parameter:
- repo-name: '{repo-stream-part}.{repo-os-part}'
- stream-parameter:
stream: '{stream}'
- shell:
!include-raw-escape:
- ../scripts/vpp/build.sh
-
- - provide-maven-settings:
- settings-file: 'vpp-settings'
- global-settings-file: 'global-settings'
- shell:
!include-raw-escape:
- ../scripts/packagecloud_push.sh
os: '{os}'
- project-parameter:
project: '{project}'
- - repo-name-parameter:
- repo-name: '{repo-stream-part}.{repo-os-part}'
- stream-parameter:
stream: '{stream}'
os: '{os}'
- project-parameter:
project: '{project}'
- - repo-name-parameter:
- repo-name: '{repo-stream-part}.ubuntu.bionic.main'
- stream-parameter:
stream: '{stream}'
os: '{os}'
- project-parameter:
project: '{project}'
- - repo-name-parameter:
- repo-name: '{repo-stream-part}.ubuntu.bionic.main'
- stream-parameter:
stream: '{stream}'
os: '{os}'
- project-parameter:
project: '{project}'
- - repo-name-parameter:
- repo-name: '{repo-stream-part}.ubuntu.bionic.main'
- stream-parameter:
stream: '{stream}'