diff options
author | Vanessa Rene Valderrama <vvalderrama@linuxfoundation.org> | 2018-02-26 16:24:19 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@fd.io> | 2018-02-26 16:24:19 +0000 |
commit | 189dbee551cfaa4dbf89e57ee36ec8a7d5f3d7ed (patch) | |
tree | 4112637f14e2e4e3b883bfaa192e43be6d35e5e3 /jjb | |
parent | 6c79a48dce1351b502b41e77f5109d8b57c33408 (diff) | |
parent | f4ea587cbeb79f8cfd8a04685f0a7f0e1cdd6298 (diff) |
Merge "fixes for cicn documentations:"
Diffstat (limited to 'jjb')
-rw-r--r-- | jjb/cicn/cicn.yaml | 145 | ||||
-rw-r--r-- | jjb/cicn/include-raw-cicn-libparc-docs.sh | 74 |
2 files changed, 217 insertions, 2 deletions
diff --git a/jjb/cicn/cicn.yaml b/jjb/cicn/cicn.yaml index c7252a864..a5e0243fb 100644 --- a/jjb/cicn/cicn.yaml +++ b/jjb/cicn/cicn.yaml @@ -24,8 +24,8 @@ jobs: - 'cicn-libparc-verify-{stream}-{os}' - 'cicn-libparc-merge-{stream}-{os}' - # - 'cicn-libparc-docs-verify-{stream}' - # - 'cicn-libparc-docs-merge-{stream}' + - 'cicn-libparc-docs-verify-{stream}' + - 'cicn-libparc-docs-merge-{stream}' project: 'cicn' os: - ubuntu1604: @@ -561,6 +561,9 @@ build-timeout: '{build-timeout}' triggers: + - reverse: + jobs: 'cicn-longbow-merge-{stream}-ubuntu1604' + result: 'success' - gerrit-trigger-patch-merged: name: '{project}' branch: '{branch}' @@ -648,6 +651,144 @@ maven-version: 'mvn33-new' - job-template: + name: 'cicn-libparc-docs-merge-{stream}' + + project-type: freestyle + node: ubuntu1604-basebuild-8c-32g + concurrent: true + + logrotate: + daysToKeep: '{build-days-to-keep}' + numToKeep: '{build-num-to-keep}' + artifactDaysToKeep: '{build-artifact-days-to-keep}' + artifactNumToKeep: '{build-artifact-num-to-keep}' + + parameters: + - project-parameter: + project: '{project}' + - gerrit-parameter: + branch: '{branch}' + - os-parameter: + os: 'ubuntu1604' + - maven-exec: + maven-version: 'mvn33-new' + + scm: + - gerrit-trigger-scm: + credentials-id: 'jenkins-gerrit-credentials' + refspec: '' + choosing-strategy: 'default' + + wrappers: + - fdio-infra-wrappers: + build-timeout: '{build-timeout}' + + triggers: + - gerrit: + server-name: 'Primary' + trigger-on: + - comment-added-contains-event: + comment-contains-value: 'run-docs' + projects: + - project-compare-type: 'ANT' + project-pattern: '{project}' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + skip-vote: + successful: true + failed: true + unstable: true + 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: 'cicn-settings' + global-settings-file: 'global-settings' + - shell: + !include-raw-escape: + - include-raw-cicn-libparc-docs.sh + publishers: + - archive: + artifacts: 'libparc/build/documentation/*.tar' + allow-empty: 'true' + fingerprint: false + only-if-success: true + default-excludes: false + - fdio-infra-shiplogs: + maven-version: 'mvn33-new' + +- job-template: + name: 'cicn-libparc-docs-verify-{stream}' + + project-type: freestyle + node: ubuntu1604-basebuild-8c-32g + concurrent: true + + logrotate: + daysToKeep: '{build-days-to-keep}' + numToKeep: '{build-num-to-keep}' + artifactDaysToKeep: '{build-artifact-days-to-keep}' + artifactNumToKeep: '{build-artifact-num-to-keep}' + + parameters: + - project-parameter: + project: '{project}' + - gerrit-parameter: + branch: '{branch}' + - os-parameter: + os: 'ubuntu1604' + - maven-exec: + maven-version: 'mvn33-new' + + scm: + - gerrit-trigger-scm: + credentials-id: 'jenkins-gerrit-credentials' + refspec: '' + choosing-strategy: 'default' + + wrappers: + - fdio-infra-wrappers: + build-timeout: '{build-timeout}' + + triggers: + - gerrit-trigger-patch-submitted: + name: '{project}' + 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: 'cicn-settings' + global-settings-file: 'global-settings' + - shell: + !include-raw-escape: + - include-raw-cicn-libparc-docs.sh + publishers: + - archive: + artifacts: 'libparc/build/documentation/*.tar' + allow-empty: 'true' + fingerprint: false + only-if-success: true + default-excludes: false + - fdio-infra-shiplogs: + maven-version: 'mvn33-new' + + +- job-template: name: 'cicn-libccnx-common-merge-{stream}-{os}' project-type: freestyle diff --git a/jjb/cicn/include-raw-cicn-libparc-docs.sh b/jjb/cicn/include-raw-cicn-libparc-docs.sh new file mode 100644 index 000000000..50f0ee530 --- /dev/null +++ b/jjb/cicn/include-raw-cicn-libparc-docs.sh @@ -0,0 +1,74 @@ +#!/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 .. +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 + <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.9</version> + </extension> + </extensions> + </build> + <distributionManagement> + <site> + <id>fdio-site</id> + <url>dav:${DOCS_REPO_URL}/${PROJECT_PATH}/${VERSION}</url> + </site> + </distributionManagement> + </project> +EOF + ${MVN} site:site site:deploy -gs "${GLOBAL_SETTINGS_FILE}" -s "${SETTINGS_FILE}" -T 4C + cd - +fi |