From f6b7d92051c41c5218ac788f3f744540305289e1 Mon Sep 17 00:00:00 2001 From: Ed Warnicke Date: Tue, 20 Sep 2016 10:54:25 -0700 Subject: [PATCH] Add nsh_sfc-docs-merge jobs Change-Id: I6b17a7b099128a1a64112bd66ea56865767fc2ea Signed-off-by: Ed Warnicke --- jjb/nsh_sfc/include-raw-nsh_sfc-docs.sh | 47 ++++++++++++++++++++++ jjb/nsh_sfc/nsh_sfc.yaml | 69 +++++++++++++++++++++++++++++++++ 2 files changed, 116 insertions(+) create mode 100644 jjb/nsh_sfc/include-raw-nsh_sfc-docs.sh 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 + + 4.0.0 + io.fd.${PROJECT_NAME} + docs + 1.0.0 + pom + + + false + + + + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.9 + + + + + + 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 - 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 + + -- 2.16.6