diff options
author | Ed Warnicke <eaw@cisco.com> | 2016-09-20 10:54:25 -0700 |
---|---|---|
committer | Ed Warnicke <eaw@cisco.com> | 2016-09-20 11:04:05 -0700 |
commit | f6b7d92051c41c5218ac788f3f744540305289e1 (patch) | |
tree | 9c57ec6f9d825e618abe5decf65db50bbc2ab470 /jjb | |
parent | a66aae950dfe3fc4f2d69e25a5512b97cd763e33 (diff) |
Add nsh_sfc-docs-merge jobs
Change-Id: I6b17a7b099128a1a64112bd66ea56865767fc2ea
Signed-off-by: Ed Warnicke <eaw@cisco.com>
Diffstat (limited to 'jjb')
-rw-r--r-- | jjb/nsh_sfc/include-raw-nsh_sfc-docs.sh | 47 | ||||
-rw-r--r-- | jjb/nsh_sfc/nsh_sfc.yaml | 69 |
2 files changed, 116 insertions, 0 deletions
diff --git a/jjb/nsh_sfc/include-raw-nsh_sfc-docs.sh b/jjb/nsh_sfc/include-raw-nsh_sfc-docs.sh new file mode 100644 index 000000000..aaf4d2624 --- /dev/null +++ b/jjb/nsh_sfc/include-raw-nsh_sfc-docs.sh @@ -0,0 +1,47 @@ +#!/bin/bash +set -xe -o pipefail +[ "PROJECT_NAME" ] || PROJECT_NAME="nsh_sfc" +[ "$DOCS_REPO_URL" ] || DOCS_REPO_URL="https://nexus.fd.io/content/sites/site" +[ "$PROJECT_PATH" ] || PROJECT_PATH=io/fd/${PROJECT_NAME} +[ "$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=$(./nsh-plugin/packaging/scripts/version) + +make doxygen +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.${PROJECT_NAME}</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 - diff --git a/jjb/nsh_sfc/nsh_sfc.yaml b/jjb/nsh_sfc/nsh_sfc.yaml index 5fad549be..841b075eb 100644 --- a/jjb/nsh_sfc/nsh_sfc.yaml +++ b/jjb/nsh_sfc/nsh_sfc.yaml @@ -282,3 +282,72 @@ - ../scripts/cleanup_vpp_plugin_dev_env.sh - ../scripts/maven_push_functions.sh - include-raw-nsh_sfc-pkg-push.sh + +- job-template: + name: 'nsh_sfc-merge-docs-{stream}' + + project-type: freestyle + node: 'verify-ubuntu1604' + 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' + + scm: + - gerrit-trigger-scm: + credentials-id: '{ssh-credentials}' + refspec: '' + choosing-strategy: 'default' + + wrappers: + - ssh-agent-credentials: + users: + - '{ssh-credentials}' + + triggers: + - reverse: + jobs: 'nsh_sfc-merge-{stream}-ubuntu1404' + result: 'success' + - 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}' + 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: include-raw-nsh_sfc-docs.sh + + |