Add nsh_sfc-docs-merge jobs 99/2999/2
authorEd Warnicke <eaw@cisco.com>
Tue, 20 Sep 2016 17:54:25 +0000 (10:54 -0700)
committerEd Warnicke <eaw@cisco.com>
Tue, 20 Sep 2016 18:04:05 +0000 (11:04 -0700)
Change-Id: I6b17a7b099128a1a64112bd66ea56865767fc2ea
Signed-off-by: Ed Warnicke <eaw@cisco.com>
jjb/nsh_sfc/include-raw-nsh_sfc-docs.sh [new file with mode: 0644]
jjb/nsh_sfc/nsh_sfc.yaml

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 (file)
index 0000000..aaf4d26
--- /dev/null
@@ -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 -
index 5fad549..841b075 100644 (file)
                 - ../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
+
+