First attempt to build vpp doxygen docs 35/2735/5
authorEd Warnicke <eaw@cisco.com>
Thu, 8 Sep 2016 19:39:32 +0000 (12:39 -0700)
committerEd Warnicke <eaw@cisco.com>
Thu, 8 Sep 2016 22:18:27 +0000 (15:18 -0700)
Change-Id: I3756dfcd832a4aa8c274abb17b4163f4f53f7d4a
Signed-off-by: Ed Warnicke <eaw@cisco.com>
jjb/vpp/include-raw-vpp-docs.sh [new file with mode: 0644]
jjb/vpp/vpp.yaml

diff --git a/jjb/vpp/include-raw-vpp-docs.sh b/jjb/vpp/include-raw-vpp-docs.sh
new file mode 100644 (file)
index 0000000..076004b
--- /dev/null
@@ -0,0 +1,63 @@
+#!/bin/bash
+set -e
+[ "$DOCS_REPO_URL" ] || DOCS_REPO_URL="https://nexus.fd.io/content/sites/site/"
+[ "$PROJECT_PATH" ] || PROJECT_PATH=io/fd/vpp
+[ "$DOCS_FILE" ] || DOC_FILE=vpp.docs.zip
+[ "$DOC_DIR" ] || DOC_DIR=build-root/docs/html
+if [ ${BRANCH} == "stable/1609"]; then
+  VERSION=16.09
+else
+  echo "************************************"
+  echo "* ${BRANCH} does not publish docs  *"
+  echo "************************************"
+  exit
+fi
+MVN="/opt/apache/maven/bin/mvn"
+
+make doxygen
+cd ${DOC_DIR}
+zip ${DOC_FILE} .
+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>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-deploy-plugin</artifactId>
+        <version>2.8.2</version>
+        <configuration>
+          <skip>true</skip>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.sonatype.plugins</groupId>
+        <artifactId>maven-upload-plugin</artifactId>
+        <version>0.0.1</version>
+        <executions>
+          <execution>
+            <id>publish-site</id>
+            <phase>deploy</phase>
+            <goals>
+              <goal>upload-file</goal>
+            </goals>
+            <configuration>
+              <serverId>opendaylight-log-archives</serverId>
+              <repositoryUrl>$DOCS_REPO_URL/content-compressed</repositoryUrl>
+              <file>${DOC_FILE}</file>
+              <repositoryPath>${PROJECT_PATH}</repositoryPath>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>
+EOF
+${MVN} deploy -gs $GLOBAL_SETTINGS_FILE -s $SETTINGS_FILE
+cd -
+
index cd8c798..91d2240 100644 (file)
@@ -4,6 +4,7 @@
         - 'vpp-verify-{stream}-{os}'
         - 'vpp-merge-{stream}-{os}'
         - 'vpp-verify-image-{stream}-{os}'
+        - 'vpp-docs-1609'
 
     project: 'vpp'
     os:
             name: TYPE
             default: '{type}'
             description: "TYPE parameter if not given by trigger"
+
+- job-template:
+    name: 'vpp-docs-1609'
+
+    project-type: freestyle
+    node: 'verify-ubuntu1404'
+    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: 'stable/1609'
+        - os-parameter:
+            os: 'ubuntu1404'
+
+    scm:
+        - gerrit-trigger-scm:
+            credentials-id: '{ssh-credentials}'
+            refspec: ''
+            choosing-strategy: 'default'
+
+    wrappers:
+        - fdio-infra-wrappers
+        - ssh-agent-credentials:
+            users:
+                - '{ssh-credentials}'
+
+    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: '**/stable/1609'
+            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-vpp-docs.sh
+