From 08a36ea653906faf169ee757baef27eb5885b01a Mon Sep 17 00:00:00 2001 From: Dave Wallace Date: Tue, 23 Nov 2021 18:19:37 -0500 Subject: Nexus retirement CI job clean up - Remove nexus configuration parameters from CI jobs for active FD.io projects - Convert HICN docs jobs to use S3 storage Change-Id: Ida00b6448926567e0245b4988597113bfea0bd84 Signed-off-by: Dave Wallace --- jjb/ci-management/packagecloud-repo-cleanup.yaml | 8 -- jjb/cicn/cicn.yaml | 68 ++--------- jjb/cicn/include-raw-cicn-libparc-build.sh | 8 -- jjb/cicn/include-raw-cicn-libparc-docs.sh | 74 ------------ jjb/cicn/include-raw-cicn-maven-push.sh | 49 -------- jjb/cicn/include-raw-cicn-viper-build.sh | 8 -- jjb/global-defaults.yaml | 1 - jjb/global-macros.yaml | 16 --- jjb/hc2vpp/hc2vpp.yaml | 8 -- jjb/hicn/hicn-docs.yaml | 59 +-------- jjb/hicn/hicn.yaml | 147 +++-------------------- jjb/hicn/include-raw-hicn-build.sh | 7 -- jjb/hicn/include-raw-hicn-checkstyle.sh | 7 -- jjb/hicn/include-raw-hicn-docs.sh | 54 --------- jjb/hicn/include-raw-hicn-extras-build.sh | 7 -- jjb/hicn/include-raw-hicn-maven-push.sh | 48 -------- jjb/scripts/cicn/build-libparc.sh | 8 ++ jjb/scripts/cicn/build-viper.sh | 8 ++ jjb/scripts/cicn/docs-libparc.sh | 38 ++++++ jjb/scripts/hicn/build-extras.sh | 7 ++ jjb/scripts/hicn/build.sh | 7 ++ jjb/scripts/hicn/checkstyle.sh | 7 ++ jjb/scripts/hicn/docs.sh | 18 +++ jjb/scripts/publish_docs.sh | 5 + jjb/scripts/setup_jvpp_dev_env.sh | 74 ------------ jjb/udpi/udpi.yaml | 20 +-- jjb/vsap/vsap.yaml | 23 +--- 27 files changed, 131 insertions(+), 653 deletions(-) delete mode 100644 jjb/cicn/include-raw-cicn-libparc-build.sh delete mode 100644 jjb/cicn/include-raw-cicn-libparc-docs.sh delete mode 100644 jjb/cicn/include-raw-cicn-maven-push.sh delete mode 100644 jjb/cicn/include-raw-cicn-viper-build.sh delete mode 100644 jjb/hicn/include-raw-hicn-build.sh delete mode 100644 jjb/hicn/include-raw-hicn-checkstyle.sh delete mode 100644 jjb/hicn/include-raw-hicn-docs.sh delete mode 100644 jjb/hicn/include-raw-hicn-extras-build.sh delete mode 100644 jjb/hicn/include-raw-hicn-maven-push.sh create mode 100644 jjb/scripts/cicn/build-libparc.sh create mode 100644 jjb/scripts/cicn/build-viper.sh create mode 100644 jjb/scripts/cicn/docs-libparc.sh create mode 100644 jjb/scripts/hicn/build-extras.sh create mode 100644 jjb/scripts/hicn/build.sh create mode 100644 jjb/scripts/hicn/checkstyle.sh create mode 100644 jjb/scripts/hicn/docs.sh delete mode 100644 jjb/scripts/setup_jvpp_dev_env.sh diff --git a/jjb/ci-management/packagecloud-repo-cleanup.yaml b/jjb/ci-management/packagecloud-repo-cleanup.yaml index 642ee2b2..dcad9efc 100644 --- a/jjb/ci-management/packagecloud-repo-cleanup.yaml +++ b/jjb/ci-management/packagecloud-repo-cleanup.yaml @@ -50,10 +50,6 @@ os: '{os}' - stream-parameter: stream: 'release' - - string: - name: ARCHIVE_ARTIFACTS - default: '{archive-artifacts}' - description: Artifacts to archive to the logs server. wrappers: - fdio-infra-wrappers: @@ -112,10 +108,6 @@ os: '{os}' - stream-parameter: stream: 'hicn' - - string: - name: ARCHIVE_ARTIFACTS - default: '{archive-artifacts}' - description: Artifacts to archive to the logs server. wrappers: - fdio-infra-wrappers: diff --git a/jjb/cicn/cicn.yaml b/jjb/cicn/cicn.yaml index 6ba90711..54737dc2 100644 --- a/jjb/cicn/cicn.yaml +++ b/jjb/cicn/cicn.yaml @@ -20,19 +20,15 @@ project: "cicn" os: - - ubuntu1804: - repo-os-part: "ubuntu.bionic.main" - - ubuntu2004: - repo-os-part: "ubuntu.focal.main" - - centos8: - repo-os-part: "centos8" + - ubuntu1804 + - ubuntu2004 + - centos8 executor-arch: "x86_64" stream: - master: branch: "cframework/master" - repo-stream-part: "master" type: - short @@ -46,17 +42,14 @@ project: "cicn" os: - - ubuntu1804: - repo-os-part: "ubuntu-arm.bionic.main" - - ubuntu2004: - repo-os-part: "ubuntu-arm.focal.main" + - ubuntu1804 + - ubuntu2004 executor-arch: "aarch64" stream: - master: branch: "cframework/master" - repo-stream-part: "master" type: - short @@ -69,16 +62,13 @@ - "cicn-viper-merge-{stream}-{os}-{executor-arch}" project: "cicn" - os: - - ubuntu1804: - repo-os-part: "ubuntu.bionic.main" + os: ubuntu1804 executor-arch: "x86_64" stream: - master: branch: "viper/master" - repo-stream-part: "master" type: - short @@ -101,12 +91,6 @@ branch: "{branch}" - os-parameter: os: "{os}" - - maven-project-parameter: - maven: "mvn33-new" - - maven-exec: - maven-version: "mvn33-new" - - repo-name-parameter: - repo-name: "{repo-stream-part}.{repo-os-part}" - stream-parameter: stream: "hicn" @@ -134,23 +118,10 @@ files: - file-id: "packagecloud_api" target: "/root/packagecloud_api" - - maven-target: - maven-version: "mvn33-new" - goals: "--version" - settings: "cicn-settings" - settings-type: cfp - global-settings: "global-settings" - global-settings-type: cfp - shell: !include-raw-escape: - ../scripts/setup_executor_env.sh - shell: !include-raw-escape: - - include-raw-cicn-libparc-build.sh - - provide-maven-settings: - settings-file: "cicn-settings" - global-settings-file: "global-settings" - - shell: !include-raw-escape: - - ../scripts/maven_push_functions.sh - - include-raw-cicn-maven-push.sh + - ../scripts/cicn/build-libparc.sh - shell: !include-raw-escape: - ../scripts/packagecloud_push.sh @@ -195,7 +166,7 @@ - shell: !include-raw-escape: - ../scripts/setup_executor_env.sh - shell: !include-raw-escape: - - include-raw-cicn-libparc-build.sh + - ../scripts/cicn/build-libparc.sh publishers: - fdio-infra-publish @@ -217,12 +188,6 @@ branch: "{branch}" - os-parameter: os: "{os}" - - maven-project-parameter: - maven: "mvn33-new" - - maven-exec: - maven-version: "mvn33-new" - - repo-name-parameter: - repo-name: "{repo-stream-part}.{repo-os-part}" - stream-parameter: stream: "hicn" @@ -253,23 +218,10 @@ files: - file-id: "packagecloud_api" target: "/root/packagecloud_api" - - maven-target: - maven-version: "mvn33-new" - goals: "--version" - settings: "cicn-settings" - settings-type: cfp - global-settings: "global-settings" - global-settings-type: cfp - shell: !include-raw-escape: - ../scripts/setup_executor_env.sh - shell: !include-raw-escape: - - include-raw-cicn-viper-build.sh - - provide-maven-settings: - settings-file: "cicn-settings" - global-settings-file: "global-settings" - - shell: !include-raw-escape: - - ../scripts/maven_push_functions.sh - - include-raw-cicn-maven-push.sh + - ../scripts/cicn/build-viper.sh - shell: !include-raw-escape: - ../scripts/packagecloud_push.sh @@ -314,7 +266,7 @@ - shell: !include-raw-escape: - ../scripts/setup_executor_env.sh - shell: !include-raw-escape: - - include-raw-cicn-viper-build.sh + - ../scripts/cicn/build-viper.sh publishers: - fdio-infra-publish diff --git a/jjb/cicn/include-raw-cicn-libparc-build.sh b/jjb/cicn/include-raw-cicn-libparc-build.sh deleted file mode 100644 index 4943501c..00000000 --- a/jjb/cicn/include-raw-cicn-libparc-build.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -# basic build script example -set -euxo pipefail -IFS=$'\n\t' - -pushd libparc/scripts -bash build-package.sh -popd diff --git a/jjb/cicn/include-raw-cicn-libparc-docs.sh b/jjb/cicn/include-raw-cicn-libparc-docs.sh deleted file mode 100644 index cb4d698e..00000000 --- a/jjb/cicn/include-raw-cicn-libparc-docs.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/bash -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 - -[ "$DOCS_REPO_URL" ] || DOCS_REPO_URL="https://nexus.fd.io/content/sites/site" -[ "$PROJECT_PATH" ] || PROJECT_PATH="io/fd/cicn/libparc" -[ "$DOC_FILE" ] || DOC_FILE="cicn.libparc.docs.zip" -[ "$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 -[ "$MVN" ] || MVN="/opt/apache/maven/bin/mvn" -[ "$VERSION" ] || VERSION=$(bash scripts/version rpm-version) - -echo "Current directory: $(pwd)" - -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 - cat > pom.xml << EOF - - 4.0.0 - io.fd.vpp - docs - 1.0.0 - pom - - - false - - - - - - org.apache.maven.wagon - wagon-webdav-jackrabbit - 3.3.3 - - - - - - fdio-site - dav:${DOCS_REPO_URL}/${PROJECT_PATH}/${VERSION} - - - -EOF - ${MVN} site:site site:deploy -gs "${GLOBAL_SETTINGS_FILE}" -s "${SETTINGS_FILE}" -T 4C - cd - -fi diff --git a/jjb/cicn/include-raw-cicn-maven-push.sh b/jjb/cicn/include-raw-cicn-maven-push.sh deleted file mode 100644 index 65fbd833..00000000 --- a/jjb/cicn/include-raw-cicn-maven-push.sh +++ /dev/null @@ -1,49 +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 -fi -# vim: ts=4 sw=4 sts=4 et ft=sh : diff --git a/jjb/cicn/include-raw-cicn-viper-build.sh b/jjb/cicn/include-raw-cicn-viper-build.sh deleted file mode 100644 index 92bf809e..00000000 --- a/jjb/cicn/include-raw-cicn-viper-build.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -# basic build script example -set -euxo pipefail -IFS=$'\n\t' - -pushd scripts -bash build-package.sh -popd diff --git a/jjb/global-defaults.yaml b/jjb/global-defaults.yaml index 3624ca8f..c370c98f 100644 --- a/jjb/global-defaults.yaml +++ b/jjb/global-defaults.yaml @@ -16,7 +16,6 @@ gerrit-server-name: Primary jenkins-ssh-credential: jenkins-gerrit-credentials lftools-version: <1.0.0 - archive-artifacts: '' # fd.io branch defaults branch: master diff --git a/jjb/global-macros.yaml b/jjb/global-macros.yaml index 0d3e9344..7eb6af4d 100644 --- a/jjb/global-macros.yaml +++ b/jjb/global-macros.yaml @@ -24,14 +24,6 @@ default: '{arch}' description: "Architecture parameter" -- parameter: - name: archive-artifacts-parameter - parameters: - - string: - name: ARCHIVE_ARTIFACTS - default: '{artifacts}' - description: "Artifacts to archive on the log server." - - parameter: name: compiler-parameter parameters: @@ -180,14 +172,6 @@ # yamllint disable-line rule:line-length description: "JJB configured PROJECT parameter to identify a Gerrit project" -- parameter: - name: repo-name-parameter - parameters: - - string: - name: REPO_NAME - default: '{repo-name}' - description: 'Name of repo to which to publish packaging' - - parameter: name: stream-parameter parameters: diff --git a/jjb/hc2vpp/hc2vpp.yaml b/jjb/hc2vpp/hc2vpp.yaml index 27a14634..d7d2d41e 100644 --- a/jjb/hc2vpp/hc2vpp.yaml +++ b/jjb/hc2vpp/hc2vpp.yaml @@ -8,20 +8,16 @@ project: 'hc2vpp' os: - ubuntu1804: - repo-os-part: 'ubuntu.bionic.main' skip-site: 'false' skip-jar-deploy: 'false' - centos7: - repo-os-part: 'centos7' skip-site: 'true' skip-jar-deploy: 'true' stream: - master: branch: 'master' - repo-stream-part: 'master' - '1904': branch: 'stable/1904' - repo-stream-part: 'stable.1904' - project: name: hc2vpp-view @@ -98,8 +94,6 @@ maven: 'mvn36' - maven-exec: maven-version: 'mvn36' - - repo-name-parameter: - repo-name: '{repo-stream-part}.{repo-os-part}' scm: - gerrit-trigger-scm: @@ -163,8 +157,6 @@ maven: 'mvn36' - maven-exec: maven-version: 'mvn36' - - repo-name-parameter: - repo-name: '{repo-stream-part}.{repo-os-part}' - string: name: SKIP_JAR_DEPLOY default: '{skip-jar-deploy}' diff --git a/jjb/hicn/hicn-docs.yaml b/jjb/hicn/hicn-docs.yaml index c428a222..4423af86 100644 --- a/jjb/hicn/hicn-docs.yaml +++ b/jjb/hicn/hicn-docs.yaml @@ -6,18 +6,12 @@ - "hicn-docs-merge-{stream}-{os}-{executor-arch}" project: "hicn" - os: - - ubuntu2004: - repo-os-part: "ubuntu.focal.main" - + os: ubuntu2004 executor-arch: "x86_64" - stream: - "master": branch: "master" branch-refspec: "" - repo-stream-part: "master" - repository-name: "hicn" type: - short - long @@ -28,9 +22,6 @@ project-type: freestyle node: "builder-{os}-prod-{executor-arch}" concurrent: true - archive-artifacts: - - "**/build-doxygen/lib/doc/html/*" - - "**/docs/build/html" allow-empty: "true" fingerprint: false only-if-success: true @@ -49,14 +40,8 @@ refspec: "{branch-refspec}" - os-parameter: os: "{os}" - - maven-exec: - maven-version: "mvn33-new" - stream-parameter: stream: "{stream}" - - string: - name: ARCHIVE_ARTIFACTS - default: "{archive-artifacts}" - description: Artifacts to archive to the logs server. scm: - gerrit-trigger-scm: @@ -74,25 +59,11 @@ branch: "{branch}" builders: - - maven-target: - maven-version: "mvn33-new" - goals: "--version" - settings: "hicn-settings" - settings-type: cfp - global-settings: "global-settings" - global-settings-type: cfp - - provide-maven-settings: - settings-file: "hicn-settings" - global-settings-file: "global-settings" - shell: !include-raw-escape: ../scripts/setup_executor_env.sh - - shell: !include-raw-escape: include-raw-hicn-docs.sh + - shell: !include-raw-escape: ../scripts/hicn/docs.sh publishers: - fdio-infra-publish - - naginator: - rerun-unstable-builds: false - max-failed-builds: 1 - fixed-delay: 90 - job-template: name: "hicn-docs-merge-{stream}-{os}-{executor-arch}" @@ -100,9 +71,6 @@ project-type: freestyle node: "builder-{os}-prod-{executor-arch}" concurrent: false - archive-artifacts: - - "**/build-doxygen/lib/doc/html/*" - - "**/docs/build/html" allow-empty: "true" fingerprint: false only-if-success: true @@ -121,14 +89,8 @@ refspec: "{branch-refspec}" - os-parameter: os: "{os}" - - maven-exec: - maven-version: "mvn33-new" - stream-parameter: stream: "{stream}" - - string: - name: ARCHIVE_ARTIFACTS - default: "{archive-artifacts}" - description: Artifacts to archive to the logs server. scm: - gerrit-trigger-scm: @@ -162,22 +124,9 @@ notbuilt: true builders: - - maven-target: - maven-version: "mvn33-new" - goals: "--version" - settings: "hicn-settings" - settings-type: cfp - global-settings: "global-settings" - global-settings-type: cfp - - provide-maven-settings: - settings-file: "hicn-settings" - global-settings-file: "global-settings" - shell: !include-raw-escape: ../scripts/setup_executor_env.sh - - shell: !include-raw-escape: include-raw-hicn-docs.sh + - shell: !include-raw-escape: ../scripts/hicn/docs.sh publishers: + - fdio-infra-publish-docs - fdio-infra-publish - - naginator: - rerun-unstable-builds: false - max-failed-builds: 1 - fixed-delay: 90 diff --git a/jjb/hicn/hicn.yaml b/jjb/hicn/hicn.yaml index 901a9edd..6ecc1f38 100644 --- a/jjb/hicn/hicn.yaml +++ b/jjb/hicn/hicn.yaml @@ -17,81 +17,50 @@ jobs: - "hicn-verify-{stream}-{os}-{executor-arch}" - "hicn-merge-{stream}-{os}-{executor-arch}" - project: "hicn" - os: - - ubuntu2004: - repo-os-part: "ubuntu.focal.main" - + os: ubuntu2004 executor-arch: "x86_64" - stream: - "master": branch: "master" - repo-stream-part: "master" - repository-name: "hicn" - "2101": branch: "stable/2101" - repo-stream-part: "stable.2101" - repository-name: "hicn" - project: name: hicn-aarch64 jobs: - "hicn-verify-{stream}-{os}-{executor-arch}" - "hicn-merge-{stream}-{os}-{executor-arch}" - project: "hicn" - - os: - - ubuntu2004: - repo-os-part: "ubuntu-arm.focal.main" - + os: ubuntu2004 executor-arch: "aarch64" - stream: - master: branch: "master" - repo-stream-part: "master" - repository-name: "hicn" - "2101": branch: "stable/2101" - repo-stream-part: "stable.2101" - repository-name: "hicn" - project: name: hicn-beta-x86_64 jobs: - "hicn-verify-{stream}-{os}-{executor-arch}" - project: "hicn" - os: - - ubuntu2004: - repo-os-part: "ubuntu.focal.main" - + os: ubuntu2004 executor-arch: "x86_64" - stream: - lightng: branch: "hicn-light-ng" - repo-stream-part: "hicn-light-ng" - project: name: hicn-beta-aarch64 jobs: - "hicn-verify-{stream}-{os}-{executor-arch}" - project: "hicn" - os: - - ubuntu2004: - repo-os-part: "ubuntu-arm.focal.main" - + os: ubuntu2004 executor-arch: "aarch64" - stream: - lightng: branch: "hicn-light-ng" - repo-stream-part: "hicn-light-ng" - project: name: hicn-misc @@ -101,17 +70,11 @@ stream: - master: branch: "master" - repo-stream-part: "master" - "2101": branch: "stable/2101" - repo-stream-part: "stable.2101" - repository-name: "hicn" - lightng: branch: "hicn-light-ng" - repo-stream-part: "hicn-light-ng" - os: - - ubuntu2004: - repo-os-part: "ubuntu.focal.main" + os: ubuntu2004 executor-arch: "x86_64" - project: @@ -120,34 +83,23 @@ - "hicn-extras-verify-{stream}-{os}-{executor-arch}" - "hicn-extras-build-{stream}-{os}-{executor-arch}" project: "hicn" - os: - - ubuntu2004: - repo-os-part: "ubuntu.focal.main" - + os: ubuntu2004 executor-arch: "x86_64" - stream: - master: branch: "master" - repo-stream-part: "master" - project: name: hicn-extras-aarch64 jobs: - "hicn-extras-verify-{stream}-{os}-{executor-arch}" - "hicn-extras-build-{stream}-{os}-{executor-arch}" - project: "hicn" - os: - - ubuntu2004: - repo-os-part: "ubuntu-arm.focal.main" - + os: ubuntu2004 executor-arch: "aarch64" - stream: - master: branch: "master" - repo-stream-part: "master" - project: name: hicn-view @@ -161,7 +113,6 @@ project-type: freestyle node: "builder-{os}-prod-{executor-arch}" concurrent: true - archive-artifacts: "**/tmp/hicn-failed-unittests/*/* **/core" properties: - lf-infra-properties: @@ -174,10 +125,6 @@ branch: "{branch}" - os-parameter: os: "{os}" - - repo-name-parameter: - repo-name: "{repo-stream-part}.ubuntu.bionic.main" - - archive-artifacts-parameter: - artifacts: '{archive-artifacts}' scm: - gerrit-trigger-scm: @@ -234,7 +181,7 @@ - shell: !include-raw-escape: - ../scripts/setup_executor_env.sh - shell: !include-raw-escape: - - include-raw-hicn-checkstyle.sh + - ../scripts/hicn/checkstyle.sh publishers: - fdio-infra-publish @@ -261,12 +208,8 @@ branch: "{branch}" - os-parameter: os: "{os}" - - repo-name-parameter: - repo-name: "{repo-stream-part}.{repo-os-part}" - stream-parameter: stream: "{stream}" - - archive-artifacts-parameter: - artifacts: '{archive-artifacts}' scm: - gerrit-trigger-scm: @@ -287,14 +230,10 @@ - shell: !include-raw-escape: - ../scripts/setup_executor_env.sh - shell: !include-raw-escape: - - include-raw-hicn-build.sh + - ../scripts/hicn/build.sh publishers: - fdio-infra-publish - - naginator: - rerun-unstable-builds: false - max-failed-builds: 2 - fixed-delay: 90 - job-template: name: "hicn-merge-{stream}-{os}-{executor-arch}" @@ -313,16 +252,8 @@ branch: "{branch}" - os-parameter: os: "{os}" - - maven-project-parameter: - maven: "mvn33-new" - - maven-exec: - maven-version: "mvn33-new" - stream-parameter: - stream: "{repository-name}" - - repo-name-parameter: - repo-name: "{repo-stream-part}.{repo-os-part}" - - archive-artifacts-parameter: - artifacts: '{archive-artifacts}' + stream: "{stream}" scm: - gerrit-trigger-scm: @@ -348,34 +279,17 @@ files: - file-id: "packagecloud_api" target: "/root/packagecloud_api" - - maven-target: - maven-version: "mvn33-new" - goals: "--version" - settings: "hicn-settings" - settings-type: cfp - global-settings: "global-settings" - global-settings-type: cfp - shell: !include-raw-escape: - ../scripts/setup_executor_env.sh - shell: !include-raw-escape: - - include-raw-hicn-checkstyle.sh + - ../scripts/hicn/checkstyle.sh - shell: !include-raw-escape: - - include-raw-hicn-build.sh - - provide-maven-settings: - settings-file: "hicn-settings" - global-settings-file: "global-settings" + - ../scripts/hicn/build.sh - shell: !include-raw-escape: - ../scripts/packagecloud_push.sh - - shell: !include-raw-escape: - - ../scripts/maven_push_functions.sh - - include-raw-hicn-maven-push.sh publishers: - fdio-infra-publish - - naginator: - rerun-unstable-builds: false - max-failed-builds: 1 - fixed-delay: 90 - project: name: hicn-sonar @@ -409,12 +323,8 @@ branch: "{branch}" - os-parameter: os: "{os}" - - repo-name-parameter: - repo-name: "{repo-stream-part}.{repo-os-part}" - stream-parameter: stream: "{stream}" - - archive-artifacts-parameter: - artifacts: '{archive-artifacts}' scm: - gerrit-trigger-scm: @@ -443,14 +353,10 @@ - shell: !include-raw-escape: - ../scripts/setup_executor_env.sh - shell: !include-raw-escape: - - include-raw-hicn-extras-build.sh + - ../scripts/hicn/build-extras.sh publishers: - fdio-infra-publish - - naginator: - rerun-unstable-builds: false - max-failed-builds: 2 - fixed-delay: 90 - job-template: name: "hicn-extras-build-{stream}-{os}-{executor-arch}" @@ -469,16 +375,8 @@ branch: "{branch}" - os-parameter: os: "{os}" - - maven-project-parameter: - maven: "mvn33-new" - - maven-exec: - maven-version: "mvn33-new" - stream-parameter: stream: "hicn" - - repo-name-parameter: - repo-name: "{repo-stream-part}.{repo-os-part}" - - archive-artifacts-parameter: - artifacts: '{archive-artifacts}' scm: - gerrit-trigger-scm: @@ -512,32 +410,15 @@ files: - file-id: "packagecloud_api" target: "/root/packagecloud_api" - - maven-target: - maven-version: "mvn33-new" - goals: "--version" - settings: "hicn-settings" - settings-type: cfp - global-settings: "global-settings" - global-settings-type: cfp - shell: !include-raw-escape: - ../scripts/setup_executor_env.sh - shell: !include-raw-escape: - - include-raw-hicn-extras-build.sh - - provide-maven-settings: - settings-file: "hicn-settings" - global-settings-file: "global-settings" + - ../scripts/hicn/build-extras.sh - shell: !include-raw-escape: - ../scripts/packagecloud_push.sh - - shell: !include-raw-escape: - - ../scripts/maven_push_functions.sh - - include-raw-hicn-maven-push.sh publishers: - fdio-infra-publish - - naginator: - rerun-unstable-builds: false - max-failed-builds: 1 - fixed-delay: 90 - project: name: hicn-info diff --git a/jjb/hicn/include-raw-hicn-build.sh b/jjb/hicn/include-raw-hicn-build.sh deleted file mode 100644 index e1d20a48..00000000 --- a/jjb/hicn/include-raw-hicn-build.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -# basic build script example -set -euxo pipefail - -pushd scripts -bash ./build-packages.sh -popd diff --git a/jjb/hicn/include-raw-hicn-checkstyle.sh b/jjb/hicn/include-raw-hicn-checkstyle.sh deleted file mode 100644 index 636590e7..00000000 --- a/jjb/hicn/include-raw-hicn-checkstyle.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/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/hicn/include-raw-hicn-docs.sh b/jjb/hicn/include-raw-hicn-docs.sh deleted file mode 100644 index f90c8fe8..00000000 --- a/jjb/hicn/include-raw-hicn-docs.sh +++ /dev/null @@ -1,54 +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/hicn" -[ "$DOC_FILE" ] || DOC_FILE="hicn.docs.zip" -[ "$DOC_DIR" ] || DOC_DIR="build-doxygen/lib/doc/html" -[ "$SITE_DIR" ] || SITE_DIR="build/doc/deploy-site/" -[ "$RESOURCES_DIR" ] || RESOURCES_DIR=${SITE_DIR}/src/site/resources -[ "$MVN" ] || MVN="/opt/apache/maven/bin/mvn" -[ "$VERSION" ] || VERSION=$(git describe --abbrev=0 | egrep -o "([0-9]{1,}\.)+[0-9]{1,}") - -echo "Current directory: $(pwd)" - -bash scripts/build-packages.sh sphinx -bash scripts/build-packages.sh 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 - - 4.0.0 - io.fd.hicn - docs - 1.0.0 - pom - - - false - - - - - - org.apache.maven.wagon - wagon-webdav-jackrabbit - 2.10 - - - - - - fdio-site - dav:${DOCS_REPO_URL}/${PROJECT_PATH}/${VERSION} - - - -EOF - ${MVN} -B site:site site:deploy -gs "${GLOBAL_SETTINGS_FILE}" -s "${SETTINGS_FILE}" -T 4C - cd - -fi diff --git a/jjb/hicn/include-raw-hicn-extras-build.sh b/jjb/hicn/include-raw-hicn-extras-build.sh deleted file mode 100644 index bcf913be..00000000 --- a/jjb/hicn/include-raw-hicn-extras-build.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -# basic build script example -set -euxo pipefail - -pushd scripts -bash ./build-extras.sh -popd diff --git a/jjb/hicn/include-raw-hicn-maven-push.sh b/jjb/hicn/include-raw-hicn-maven-push.sh deleted file mode 100644 index 6e3c9a86..00000000 --- a/jjb/hicn/include-raw-hicn-maven-push.sh +++ /dev/null @@ -1,48 +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 -fi diff --git a/jjb/scripts/cicn/build-libparc.sh b/jjb/scripts/cicn/build-libparc.sh new file mode 100644 index 00000000..967670e3 --- /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 00000000..38018b77 --- /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 00000000..0ca4effb --- /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 00000000..bcf913be --- /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 00000000..e1d20a48 --- /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 00000000..636590e7 --- /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 00000000..f44b93dd --- /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 841789d8..adc17966 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 c489a547..00000000 --- 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 diff --git a/jjb/udpi/udpi.yaml b/jjb/udpi/udpi.yaml index 2d4ece92..916fd9b1 100644 --- a/jjb/udpi/udpi.yaml +++ b/jjb/udpi/udpi.yaml @@ -23,17 +23,13 @@ project: 'udpi' os: - - ubuntu1604: - repo-os-part: 'ubuntu.xenial.main' - - centos7: - repo-os-part: 'centos7' + - ubuntu1604 + - centos7 stream: - master: branch: 'master' - repo-stream-part: 'master' - '2001': branch: 'stable/2001' - repo-stream-part: 'stable.2001' - project: name: udpi-view @@ -59,14 +55,8 @@ branch: '{branch}' - os-parameter: os: '{os}' - - repo-name-parameter: - repo-name: '{repo-stream-part}.{repo-os-part}' - stream-parameter: stream: '{stream}' - - string: - name: ARCHIVE_ARTIFACTS - default: '{archive-artifacts}' - description: Artifacts to archive to the logs server. scm: - gerrit-trigger-scm: @@ -127,12 +117,6 @@ os: '{os}' - stream-parameter: stream: '{stream}' - - repo-name-parameter: - repo-name: '{repo-stream-part}.{repo-os-part}' - - string: - name: ARCHIVE_ARTIFACTS - default: '{archive-artifacts}' - description: Artifacts to archive to the logs server. scm: - gerrit-trigger-scm: diff --git a/jjb/vsap/vsap.yaml b/jjb/vsap/vsap.yaml index 6b59eecb..2c28655b 100644 --- a/jjb/vsap/vsap.yaml +++ b/jjb/vsap/vsap.yaml @@ -22,18 +22,13 @@ - 'vsap-merge-{stream}-{os}-{mode}' project: 'vsap' - os: - - ubuntu1804: - repo-os-part: 'ubuntu.bionic.main' + os: ubuntu1804 stream: - '2005': branch: 'stable/2005' - repo-stream-part: 'stable.2005' mode: - - vcl: - repo-mode-part: 'vcl' - - ldp: - repo-mode-part: 'ldp' + - vcl + - ldp - project: name: vsap-view @@ -60,16 +55,10 @@ - gerrit-refspec-parameter - os-parameter: os: '{os}' - - repo-name-parameter: - repo-name: '{repo-stream-part}.{repo-os-part}.{repo-mode-part}' - stream-parameter: stream: '{stream}' - mode-parameter: mode: '{mode}' - - string: - name: ARCHIVE_ARTIFACTS - default: '{archive-artifacts}' - description: Artifacts to archive to the logs server. scm: - gerrit-trigger-scm-recursive: @@ -119,12 +108,6 @@ stream: '{stream}' - mode-parameter: mode: '{mode}' - - repo-name-parameter: - repo-name: '{repo-stream-part}.{repo-os-part}.{repo-mode-part}' - - string: - name: ARCHIVE_ARTIFACTS - default: '{archive-artifacts}' - description: Artifacts to archive to the logs server. scm: - gerrit-trigger-scm-recursive: -- cgit 1.2.3-korg