Merge "Configuring minions as single use"
authorAndrew Grimberg <agrimberg@linuxfoundation.org>
Tue, 4 Oct 2016 14:18:13 +0000 (14:18 +0000)
committerGerrit Code Review <gerrit@fd.io>
Tue, 4 Oct 2016 14:18:13 +0000 (14:18 +0000)
21 files changed:
jenkins-scripts/README [new file with mode: 0644]
jenkins-scripts/basic_settings.sh [new file with mode: 0755]
jenkins-scripts/create_jenkins_user.sh [new file with mode: 0755]
jenkins-scripts/jenkins-init-script.sh [new file with mode: 0755]
jenkins-scripts/system_type.sh [new file with mode: 0755]
jjb/ci-management/ci-management-jobs.yaml
jjb/deb_dpdk/deb_dpdk.yaml [new file with mode: 0644]
jjb/deb_dpdk/include-raw-deb_dpdk-build.sh [new file with mode: 0644]
jjb/deb_dpdk/include-raw-deb_dpdk-pkg-push.sh [new file with mode: 0644]
jjb/honeycomb/honeycomb.yaml
jjb/nsh_sfc/include-raw-nsh_sfc-docs.sh [new file with mode: 0644]
jjb/nsh_sfc/include-raw-nsh_sfc-pkg-push.sh [new file with mode: 0644]
jjb/nsh_sfc/nsh_sfc.yaml
jjb/scripts/maven_push_functions.sh
jjb/tldk/tldk.yaml
jjb/trex/include-raw-trex-build.sh [new file with mode: 0644]
jjb/trex/trex.yaml [new file with mode: 0644]
jjb/vpp/include-raw-vpp-docs.sh [new file with mode: 0644]
jjb/vpp/include-raw-vpp-maven-push.sh
jjb/vpp/vpp.yaml
vagrant/lib/bootstrap-functions.sh

diff --git a/jenkins-scripts/README b/jenkins-scripts/README
new file mode 100644 (file)
index 0000000..cff7f26
--- /dev/null
@@ -0,0 +1,8 @@
+The scripts in this directory are used by the Jenkins spin-up component
+for dynamic minions.
+
+The spinup script will be as follows (${system_type} will be replaced
+with the appropriate system_type script)
+
+git clone https://gerrit.fd.io/r/p/ci-management.git /ci-management
+/ci-management/jenkins-scripts/jenkins-init-script.sh
diff --git a/jenkins-scripts/basic_settings.sh b/jenkins-scripts/basic_settings.sh
new file mode 100755 (executable)
index 0000000..412dfff
--- /dev/null
@@ -0,0 +1,54 @@
+#!/bin/bash
+# @License EPL-1.0 <http://spdx.org/licenses/EPL-1.0>
+##############################################################################
+# Copyright (c) 2016 The Linux Foundation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+##############################################################################
+
+case "$(facter operatingsystem)" in
+  Ubuntu)
+    apt-get update
+    # make sure that the ca-certs are properly updated
+    /usr/sbin/update-ca-certificates
+
+    # attach to the fd.io.dev apt repo
+    echo 'deb http://nexus.fd.io/content/repositories/fd.io.dev/ ./' >> /etc/apt/sources.list
+    ;;
+  *)
+    # Do nothing on other distros for now
+    ;;
+esac
+
+IPADDR=$(facter ipaddress)
+HOSTNAME=$(facter hostname)
+FQDN=$(facter fqdn)
+
+echo "${IPADDR} ${HOSTNAME} ${FQDN}" >> /etc/hosts
+
+#Increase limits
+cat <<EOF > /etc/security/limits.d/jenkins.conf
+jenkins         soft    nofile          16000
+jenkins         hard    nofile          16000
+EOF
+
+cat <<EOSSH >> /etc/ssh/ssh_config
+Host *
+  ServerAliveInterval 60
+
+# we don't want to do SSH host key checking on spin-up systems
+# Don't use CIDR since SSH won't parse it
+# 10.30.48.0/23
+Host 10.30.48.* 10.30.49.*
+  StrictHostKeyChecking no
+  UserKnownHostsFile /dev/null
+EOSSH
+
+cat <<EOKNOWN >  /etc/ssh/ssh_known_hosts
+[gerrit.fd.io]:29418,[162.253.54.31]:29418 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC76FxV43JIk/HpI5JUZfizmak9znK/QzsjPoNHt/Eo2Vp68kvJIRZ+PzI7RJR0NsdsXlyqzRsGuH+Cj99ZuLVjNMqz1Y1A5y6itYAgT42KDcnV/JoPx6WV+THdQ+oMSp2dINtvD1kc6Om8iAA2CwYOfIZ/FQS5A9OX2xzFopo4qAN3nRk9kpcHyC698R5SDNZBbk6eqlsBz0827KJrSpOSEEMBhtroBM4JV8vImcSWeJuQ5QFdZgQdQaI8R5YFBRbWu3mDSgJfjJk89xT2CkUiqIynNJeiQMM4IZxcdQB3zJ1RUEJepxv77yV09NZ8jwhaN6X659UJZjsCZ5ffvc77
+EOKNOWN
+
+# vim: sw=2 ts=2 sts=2 et :
diff --git a/jenkins-scripts/create_jenkins_user.sh b/jenkins-scripts/create_jenkins_user.sh
new file mode 100755 (executable)
index 0000000..779d1f7
--- /dev/null
@@ -0,0 +1,41 @@
+#!/bin/bash
+# @License EPL-1.0 <http://spdx.org/licenses/EPL-1.0>
+##############################################################################
+# Copyright (c) 2016 The Linux Foundation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+##############################################################################
+
+#######################
+# Create Jenkins User #
+#######################
+
+OS=$(facter operatingsystem | tr '[:upper:]' '[:lower:]')
+
+useradd -m -s /bin/bash jenkins
+
+# Check if docker group exists
+grep -q docker /etc/group
+if [ "$?" == '0' ]
+then
+  # Add jenkins user to docker group
+  usermod -a -G docker jenkins
+fi
+
+# Check if mock group exists
+grep -q mock /etc/group
+if [ "$?" == '0' ]
+then
+  # Add jenkins user to mock group so it can build RPMs using mock if available
+  usermod -a -G mock jenkins
+fi
+
+mkdir /home/jenkins/.ssh
+mkdir /w
+cp -r /home/${OS}/.ssh/authorized_keys /home/jenkins/.ssh/authorized_keys
+# Generate ssh key for use by Robot jobs
+echo -e 'y\n' | ssh-keygen -N "" -f /home/jenkins/.ssh/id_rsa -t rsa
+chown -R jenkins:jenkins /home/jenkins/.ssh /w
diff --git a/jenkins-scripts/jenkins-init-script.sh b/jenkins-scripts/jenkins-init-script.sh
new file mode 100755 (executable)
index 0000000..67987b5
--- /dev/null
@@ -0,0 +1,27 @@
+#!/bin/bash
+# @License EPL-1.0 <http://spdx.org/licenses/EPL-1.0>
+##############################################################################
+# Copyright (c) 2016 The Linux Foundation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+##############################################################################
+
+# vim: ts=4 sw=4 sts=4 et :
+
+cd /ci-management/jenkins-scripts
+chmod +x ./*.sh
+./system_type.sh
+
+source /tmp/system_type.sh
+./basic_settings.sh
+if [ -f "${SYSTEM_TYPE}.sh" ]
+then
+    ./"${SYSTEM_TYPE}.sh"
+fi
+
+# Create the jenkins user last so that hopefully we don't have to deal with
+# guard files
+./create_jenkins_user.sh
diff --git a/jenkins-scripts/system_type.sh b/jenkins-scripts/system_type.sh
new file mode 100755 (executable)
index 0000000..88210a4
--- /dev/null
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+# @License EPL-1.0 <http://spdx.org/licenses/EPL-1.0>
+##############################################################################
+# Copyright (c) 2016 The Linux Foundation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+##############################################################################
+
+HOST=$(/bin/hostname)
+SYSTEM_TYPE=''
+
+IFS=','
+for i in "basebuild,basebuild" \
+         "centos,centos" \
+         "ubuntu1404,ubuntu1404" \
+         "ubuntu1604,ubuntu1604"
+do set -- $i
+    if [[ $HOST == *"$1"* ]]; then
+        SYSTEM_TYPE="$2"
+        break
+    fi
+done
+
+# Write out the system type to an environment file to then be sourced
+echo "SYSTEM_TYPE=${SYSTEM_TYPE}" > /tmp/system_type.sh
+
+# vim: sw=4 ts=4 sts=4 et :
index 585d608..fbce13f 100644 (file)
@@ -68,8 +68,8 @@
     scm:
         - gerrit-trigger-scm:
             credentials-id: '{ssh-credentials}'
-            refspec: refs/heads/master
-            choosing-strategy: 'gerrit'
+            refspec: ''
+            choosing-strategy: 'default'
 
     wrappers:
         - ssh-agent-credentials:
diff --git a/jjb/deb_dpdk/deb_dpdk.yaml b/jjb/deb_dpdk/deb_dpdk.yaml
new file mode 100644 (file)
index 0000000..d7f9384
--- /dev/null
@@ -0,0 +1,182 @@
+- project:
+    name: deb_dpdk
+    jobs:
+        - 'deb_dpdk-verify-{stream}-{os}'
+        - 'deb_dpdk-merge-{stream}-{os}'
+        - 'deb_dpdk-verify-image-{stream}-{os}'
+
+    project: 'deb_dpdk'
+    os:
+        - ubuntu1404:
+            repo-os-part: 'ubuntu.trusty.main'
+        - ubuntu1604:
+            repo-os-part: 'ubuntu.xenial.main'
+    stream:
+        - master:
+            branch: 'master'
+            repo-stream-part: 'master'
+        - 1607:
+            branch: 'deb_dpdk_16.07'
+            repo-stream-part: 'deb_dpdk_1607'
+
+- job-template:
+    name: 'deb_dpdk-verify-{stream}-{os}'
+
+    project-type: freestyle
+    node: 'verify-{os}'
+    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: '{os}'
+        - repo-name-parameter:
+            repo-name: '{repo-stream-part}.{repo-os-part}'
+
+    scm:
+        - gerrit-trigger-scm:
+            credentials-id: '{ssh-credentials}'
+            refspec: '$GERRIT_REFSPEC'
+            choosing-strategy: 'gerrit'
+
+    wrappers:
+        - ssh-agent-credentials:
+            users:
+                - '{ssh-credentials}'
+        - fdio-infra-wrappers:
+            build-timeout: '{build-timeout}'
+
+    triggers:
+        - gerrit-trigger-patch-submitted:
+            name: '{project}'
+            branch: '{branch}'
+
+    builders:
+        - shell:
+            !include-raw-escape:
+                - include-raw-deb_dpdk-build.sh
+
+- job-template:
+    name: 'deb_dpdk-verify-image-{stream}-{os}'
+
+    project-type: freestyle
+    node: 'verify-image-{os}'
+    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: '{os}'
+        - repo-name-parameter:
+            repo-name: '{repo-stream-part}.{repo-os-part}'
+
+    scm:
+        - gerrit-trigger-scm:
+            credentials-id: '{ssh-credentials}'
+            refspec: '$GERRIT_REFSPEC'
+            choosing-strategy: 'gerrit'
+
+    wrappers:
+        - ssh-agent-credentials:
+            users:
+                - '{ssh-credentials}'
+        - fdio-infra-wrappers:
+            build-timeout: '{build-timeout}'
+
+    triggers:
+        - gerrit:
+            server-name: 'Primary'
+            trigger-on:
+                - comment-added-contains-event:
+                    comment-contains-value: 'verify-images'
+            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:
+        - shell:
+            !include-raw-escape:
+                - include-raw-deb_dpdk-build.sh
+
+- job-template:
+    name: 'deb_dpdk-merge-{stream}-{os}'
+
+    project-type: freestyle
+    node: 'merge-{os}'
+
+    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: '{os}'
+        - repo-name-parameter:
+            repo-name: '{repo-stream-part}.{repo-os-part}'
+
+    scm:
+        - gerrit-trigger-scm:
+            credentials-id: '{ssh-credentials}'
+            refspec: ''
+            choosing-strategy: 'default'
+
+    wrappers:
+        - ssh-agent-credentials:
+            users:
+                - '{ssh-credentials}'
+        - fdio-infra-wrappers:
+            build-timeout: '{build-timeout}'
+
+    triggers:
+        - gerrit-trigger-patch-merged:
+            name: '{project}'
+            branch: '{branch}'
+
+    builders:
+        - config-file-provider:
+            files:
+              - file-id: 'deb_dpdk-settings'
+                variable: 'SETTINGS_FILE'
+              - file-id: 'global-settings'
+                variable: 'GLOBAL_SETTINGS_FILE'
+        - shell:
+            !include-raw-escape: ../scripts/create_maven_env.sh
+        - inject:
+            properties-file: maven_env.txt
+        - shell:
+            !include-raw-escape:
+                - include-raw-deb_dpdk-build.sh
+                - ../scripts/maven_push_functions.sh
+                - include-raw-deb_dpdk-pkg-push.sh
diff --git a/jjb/deb_dpdk/include-raw-deb_dpdk-build.sh b/jjb/deb_dpdk/include-raw-deb_dpdk-build.sh
new file mode 100644 (file)
index 0000000..23b56da
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/bash
+# basic build script example
+set -e -o pipefail
+# do nothing but print the current slave hostname
+hostname
+
+echo "cat /etc/bootstrap.sha"
+if [ -f /etc/bootstrap.sha ];then
+    cat /etc/bootstrap.sha
+else
+    echo "Cannot find /etc/bootstrap.sha"
+fi
+
+echo "cat /etc/bootstrap-functions.sha"
+if [ -f /etc/bootstrap-functions.sha ];then
+    cat /etc/bootstrap-functions.sha
+else
+    echo "Cannot find /etc/bootstrap-functions.sha"
+fi
+
+echo "sha1sum of this script: ${0}"
+sha1sum $0
+
+MISSING_PKGS=$(dpkg-checkbuilddeps |& perl -pe 's/^.+://g; s/\(.*?\)//g')
+sudo apt-get install -y ${MISSING_PKGS}
+debuild -uc -us -j4
+
+echo "*******************************************************************"
+echo "* DEB_DPDK BUILD SUCCESSFULLY COMPLETED"
+echo "*******************************************************************"
diff --git a/jjb/deb_dpdk/include-raw-deb_dpdk-pkg-push.sh b/jjb/deb_dpdk/include-raw-deb_dpdk-pkg-push.sh
new file mode 100644 (file)
index 0000000..8e03405
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/bash
+DEBS=$(find . -type f -iname '*.deb')
+echo "Found DEBS=${DEBS}"
+for i in $DEBS
+do
+    push_deb "$i"
+done
\ No newline at end of file
index 386fb21..4c67850 100644 (file)
@@ -9,8 +9,10 @@
     os:
         - ubuntu1404:
             repo-os-part: 'ubuntu.trusty.main'
+            skip-site: 'false'
         - centos7:
             repo-os-part: 'centos7'
+            skip-site: 'true'
     stream:
         - master:
             branch: 'master'
             choosing-strategy: 'gerrit'
 
     wrappers:
-        - build-timeout
         - ssh-agent-credentials:
             users:
                 - '{ssh-credentials}'
+        - fdio-infra-wrappers:
+            build-timeout: '{build-timeout}'
 
     triggers:
         - gerrit-trigger-patch-submitted:
@@ -62,7 +65,7 @@
     maven:
         maven-name: '{mvn33}'
         root-pom: 'pom.xml'
-        goals: 'clean install -V -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r  -Dmerge -Dkaraf.keep.unpack=true'
+        goals: 'clean install -V -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r  -Dmerge -Dkaraf.keep.unpack=true site'
         maven-opts: '-Xmx2048m -Dmaven.compile.fork=true'
         settings: 'honeycomb-settings'
         settings-type: cfp
             choosing-strategy: 'gerrit'
 
     wrappers:
-        - build-timeout
         - ssh-agent-credentials:
             users:
                 - '{ssh-credentials}'
+        - fdio-infra-wrappers:
+            build-timeout: '{build-timeout}'
 
     triggers:
         - gerrit:
             choosing-strategy: 'default'
 
     wrappers:
-        - build-timeout
         - ssh-agent-credentials:
             users:
                 - '{ssh-credentials}'
+        - fdio-infra-wrappers:
+            build-timeout: '{build-timeout}'
 
     triggers:
         - gerrit-trigger-patch-merged:
     maven:
         maven-name: '{mvn33}'
         root-pom: 'pom.xml'
-        goals: 'clean install -V -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r  -Dmerge -Dkaraf.keep.unpack=true -Dsonar'
+        goals: 'clean install -V -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r  -Dmerge -Dkaraf.keep.unpack=true -Dsonar -Dmaven.site.skip={skip-site} site -Dmaven.site.deploy.skip={skip-site} site:deploy'
         maven-opts: '-Xmx2048m -Dmaven.compile.fork=true'
         settings: 'honeycomb-settings'
         settings-type: cfp
             branch: '{branch}'
 
     wrappers:
-        - build-timeout
         - ssh-agent-credentials:
             users:
                 - '{ssh-credentials}'
+        - fdio-infra-wrappers:
+            build-timeout: '{build-timeout}'
 
     triggers:
         - reverse:
     maven:
         maven-name: '{mvn33}'
         root-pom: 'pom.xml'
-        goals: 'clean install -V -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r  -Dmerge -Dkaraf.keep.unpack=true -Dsonar'
+        goals: 'clean install -V -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r  -Dmerge -Dkaraf.keep.unpack=true'
         maven-opts: '-Xmx2048m -Dmaven.compile.fork=true'
         settings: 'honeycomb-settings'
         settings-type: cfp
         - findbugs
 
     publishers:
-        - sonar:
-            language: 'java'
-            branch: '{stream}'
         - email-notification:
             email-prefix: '[honeycomb]'
         - maven-deploy:
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..119a41d
--- /dev/null
@@ -0,0 +1,49 @@
+#!/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
+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.${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 -
+fi
diff --git a/jjb/nsh_sfc/include-raw-nsh_sfc-pkg-push.sh b/jjb/nsh_sfc/include-raw-nsh_sfc-pkg-push.sh
new file mode 100644 (file)
index 0000000..4cfd300
--- /dev/null
@@ -0,0 +1,44 @@
+#!/bin/bash
+# basic build script example
+set -e -o pipefail
+echo "Looking for jars/debs/rpms to publish"
+if [ "${OS}" == "ubuntu1404" ]; then
+    # Find the files
+    DEBS=$(find . -type f -iname '*.deb')
+    echo "Found DEBS=${DEBS}"
+    for i in $DEBS
+    do
+        push_deb "$i"
+    done
+
+    export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/
+    export JAVAC=${JAVA_HOME}/bin/javac
+    export PATH=${JAVA_HOME}/bin/:${PATH}
+    cd nsh-plugin/build/java/jvpp
+    $MVN deploy \
+        -gs "$GLOBAL_SETTINGS_FILE" -s "$SETTINGS_FILE"
+    cd -
+
+elif [ "${OS}" == "ubuntu1604" ]; then
+
+    # Find the files
+    DEBS=$(find . -type f -iname '*.deb')
+    echo "Found DEBS=${DEBS}"
+    for i in $DEBS
+    do
+        push_deb "$i"
+    done
+
+elif [ "${OS}" == "centos7" ]; then
+    # Find the files
+    RPMS=$(find . -type f -iname '*.rpm')
+    SRPMS=$(find . -type f -iname '*.srpm')
+    SRCRPMS=$(find . -type f -name '*.src.rpm')
+    echo "Found RPMS=${RPMS}"
+    echo "Found SRPMS=${SRPMS}"
+    echo "Found SRCRPMS=${SRCRPMS}"
+    for i in $RPMS $SRPMS $SRCRPMS
+    do
+        push_rpm "$i"
+    done
+fi
\ No newline at end of file
index ee11c12..7cb2fc9 100644 (file)
@@ -3,7 +3,10 @@
     jobs:
         - 'nsh_sfc-verify-{stream}-{os}'
         - 'nsh_sfc-merge-{stream}-{os}'
+        - 'nsh_sfc-integration-{stream}-{os}'
         - 'nsh_sfc-verify-image-{stream}-{os}'
+        - 'nsh_sfc-verify-docs-{stream}'
+        - 'nsh_sfc-merge-docs-{stream}'
 
     project: 'nsh_sfc'
     os:
@@ -17,6 +20,9 @@
         - master:
             branch: 'master'
             repo-stream-part: 'master'
+        - '1609':
+            branch: 'stable/1609'
+            repo-stream-part: 'stable.1609'
 
 - job-template:
     name: 'nsh_sfc-verify-{stream}-{os}'
@@ -51,6 +57,8 @@
         - ssh-agent-credentials:
             users:
                 - '{ssh-credentials}'
+        - fdio-infra-wrappers:
+            build-timeout: '{build-timeout}'
 
     triggers:
         - gerrit-trigger-patch-submitted:
         - ssh-agent-credentials:
             users:
                 - '{ssh-credentials}'
+        - fdio-infra-wrappers:
+            build-timeout: '{build-timeout}'
 
     triggers:
         - gerrit:
         - ssh-agent-credentials:
             users:
                 - '{ssh-credentials}'
+        - fdio-infra-wrappers:
+            build-timeout: '{build-timeout}'
 
     triggers:
         - gerrit-trigger-patch-merged:
                 - ../scripts/setup_vpp_plugin_dev_env.sh
                 - include-raw-nsh_sfc-build.sh
                 - ../scripts/cleanup_vpp_plugin_dev_env.sh
+
+- job-template:
+    name: 'nsh_sfc-integration-{stream}-{os}'
+
+    project-type: freestyle
+    node: 'merge-{os}'
+
+    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: '{os}'
+        - repo-name-parameter:
+            repo-name: '{repo-stream-part}.{repo-os-part}'
+
+    scm:
+        - gerrit-trigger-scm:
+            credentials-id: '{ssh-credentials}'
+            refspec: ''
+            choosing-strategy: 'default'
+
+    wrappers:
+        - ssh-agent-credentials:
+            users:
+                - '{ssh-credentials}'
+        - fdio-infra-wrappers:
+            build-timeout: '{build-timeout}'
+
+    triggers:
+        - reverse:
+            jobs: 'vpp-merge-{stream}-{os},nsh_sfc-merge-{stream}-{os}'
+            result: 'success'
+
+    builders:
+        - config-file-provider:
+            files:
+              - file-id: 'nsh_sfc-settings'
+                variable: 'SETTINGS_FILE'
+              - file-id: 'global-settings'
+                variable: 'GLOBAL_SETTINGS_FILE'
+        - shell:
+            !include-raw-escape: ../scripts/create_maven_env.sh
+        - inject:
+            properties-file: maven_env.txt
+        - shell:
+            !include-raw-escape:
+                - ../scripts/cleanup_vpp_plugin_dev_env.sh
+                - ../scripts/setup_vpp_plugin_dev_env.sh
+                - include-raw-nsh_sfc-build.sh
+                - ../scripts/cleanup_vpp_plugin_dev_env.sh
+                - ../scripts/maven_push_functions.sh
+                - include-raw-nsh_sfc-pkg-push.sh
+
+- job-template:
+    name: 'nsh_sfc-verify-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}'
+        - fdio-infra-wrappers:
+            build-timeout: '{build-timeout}'
+
+    triggers:
+        - gerrit-trigger-patch-submitted:
+            name: '{project}'
+            branch: '{branch}'
+
+    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
+
+
+
+
+- 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}'
+        - fdio-infra-wrappers:
+            build-timeout: '{build-timeout}'
+
+    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
+
+
index 22a22cb..5687a56 100644 (file)
@@ -70,8 +70,10 @@ function push_deb ()
     basefile=$(basename -s .deb "$debfile")
     artifactId=$(echo "$basefile" | cut -f 1 -d '_')
     version=$(echo "$basefile" | cut -f 2- -d '_')
+    file_type=deb
+    classifier=deb
 
-    push_file "$debfile" "$repoId" "$url" "$version" "$artifactId" deb deb
+    push_file "$debfile" "$repoId" "$url" "$version" "$artifactId" "$file_type" "$classifier"
 }
 
 function push_rpm ()
index 3f80c04..0ee3806 100644 (file)
@@ -45,6 +45,8 @@
         - ssh-agent-credentials:
             users:
                 - '{ssh-credentials}'
+        - fdio-infra-wrappers:
+            build-timeout: '{build-timeout}'
 
     triggers:
         - gerrit-trigger-patch-submitted:
@@ -86,6 +88,8 @@
         - ssh-agent-credentials:
             users:
                 - '{ssh-credentials}'
+        - fdio-infra-wrappers:
+            build-timeout: '{build-timeout}'
 
     triggers:
         - gerrit:
         - ssh-agent-credentials:
             users:
                 - '{ssh-credentials}'
+        - fdio-infra-wrappers:
+            build-timeout: '{build-timeout}'
 
     triggers:
         - gerrit-trigger-patch-merged:
 
     builders:
         - shell:
-            !include-raw-escape: include-raw-build.sh
\ No newline at end of file
+            !include-raw-escape: include-raw-build.sh
diff --git a/jjb/trex/include-raw-trex-build.sh b/jjb/trex/include-raw-trex-build.sh
new file mode 100644 (file)
index 0000000..24049ac
--- /dev/null
@@ -0,0 +1,53 @@
+#!/bin/bash -ex
+
+# emulate unique name for now
+GERRIT_NEWREV=hash`date +%s%N`
+WS=${PWD}/$GERRIT_NEWREV
+
+#  temporary don't fail
+set +e
+
+function clean_ws {
+    rm -rf "$WS"
+}
+trap clean_ws EXIT
+
+echo "$WS"
+clean_ws
+mkdir "$WS"
+cd "$WS"
+
+# cloning
+
+git clone https://github.com/cisco-system-traffic-generator/trex-core.git
+git clone https://github.com/cisco-system-traffic-generator/trex-doc.git
+ls -l
+
+# building core
+
+cd trex-core/linux_dpdk
+./b configure
+./b build
+cd -
+
+cd trex-core/linux
+./b configure
+./b build
+cd -
+
+which asciidoc
+which sphinx-build
+which dblatex
+which python
+which python3
+which pip
+
+# building docs
+
+cd trex-doc
+./b configure
+./b build
+cd -
+
+echo Done
+
diff --git a/jjb/trex/trex.yaml b/jjb/trex/trex.yaml
new file mode 100644 (file)
index 0000000..21863c6
--- /dev/null
@@ -0,0 +1,53 @@
+- project:
+    name: trex
+    jobs:
+        - 'trex-verify-{stream}-{os}'
+
+    project: 'trex'
+    os:
+        - ubuntu1404
+        - ubuntu1604
+        - centos7
+
+    stream:
+        - master:
+            branch: 'master'
+
+
+- job-template:
+    name: 'trex-verify-{stream}-{os}'
+
+    project-type: freestyle
+    node: 'verify-{os}'
+    concurrent: true
+
+    logrotate:
+      artifactDaysToKeep: '-1'
+      artifactNumToKeep: '-1'
+      daysToKeep: '30'
+      numToKeep: '100'
+
+    parameters:
+        - project-parameter:
+            project: '{project}'
+        - gerrit-parameter:
+            branch: '{branch}'
+        - os-parameter:
+            os: '{os}'
+    wrappers:
+      - fdio-infra-wrappers:
+          build-timeout: '{build-timeout}'
+
+    triggers:
+        - timed: H */6 * * *
+
+    builders:
+        - shell:
+            !include-raw-escape: include-raw-trex-build.sh
+
+    description: "!!! Playground to verify that TRex and docs can be built. !!!\r\n\
+        \r\n\
+        TODO:\r\n\
+        1) merge doc and core repos\r\n\
+        2) replace pull from github by fd.io gerrit with triggering\r\n\
+        3) add a real regression\r\n\r\n"
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..5ab0df2
--- /dev/null
@@ -0,0 +1,50 @@
+#!/bin/bash
+set -xe -o pipefail
+[ "$DOCS_REPO_URL" ] || DOCS_REPO_URL="https://nexus.fd.io/content/sites/site"
+[ "$PROJECT_PATH" ] || PROJECT_PATH=io/fd/vpp
+[ "$DOC_FILE" ] || DOC_FILE=vpp.docs.zip
+[ "$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=$(./build-root/scripts/version rpm-version)
+
+make doxygen
+
+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
\ No newline at end of file
index ce07fee..24bd5c7 100644 (file)
@@ -10,79 +10,6 @@ GROUP_ID="io.fd.${PROJECT}"
 BASEURL="${NEXUSPROXY}/content/repositories/fd.io."
 BASEREPOID='fdio-'
 
-function push_file ()
-{
-    push_file=$1
-    repoId=$2
-    url=$3
-    version=$4
-    artifactId=$5
-    file_type=$6
-    classifier=$7
-
-    if [ "$classifier" ]; then
-        d_classifier="-Dclassifier=$7"
-    fi
-
-    # Disable checks for doublequote to prevent glob / splitting
-    # shellcheck disable=SC2086
-    $MVN org.apache.maven.plugins:maven-deploy-plugin:deploy-file \
-        -Dfile=$push_file -DrepositoryId=$repoId \
-        -Durl=$url -DgroupId=$GROUP_ID \
-        -Dversion=$version -DartifactId=$artifactId \
-        -Dtype=$file_type $d_classifier\
-        -gs $GLOBAL_SETTINGS_FILE -s $SETTINGS_FILE
-
-    # make sure the script bombs if we fail an upload
-    if [ "$?" != '0' ]; then
-        echo "ERROR: There was an error with the upload"
-        exit 1
-    fi
-}
-
-function push_jar ()
-{
-    jarfile=$1
-    repoId="${BASEREPOID}snapshot"
-    url="${BASEURL}snapshot"
-
-    basefile=$(basename -s .jar "$jarfile")
-    artifactId=$(echo "$basefile" | rev | cut -d '-' -f 2-  | rev)
-    version=$(echo "$basefile" | rev | cut -d '-' -f 1  | rev)
-
-    push_file "$jarfile" "$repoId" "$url" "${version}-SNAPSHOT" "$artifactId" jar
-}
-
-function push_deb ()
-{
-    debfile=$1
-    repoId="fd.io.${REPO_NAME}"
-    url="${BASEURL}${REPO_NAME}"
-
-    basefile=$(basename -s .deb "$debfile")
-    artifactId=$(echo "$basefile" | cut -f 1 -d '_')
-    version=$(echo "$basefile" | cut -f 2- -d '_')
-
-    push_file "$debfile" "$repoId" "$url" "$version" "$artifactId" deb deb
-}
-
-function push_rpm ()
-{
-    rpmfile=$1
-    repoId="fd.io.${REPO_NAME}"
-    url="${BASEURL}${REPO_NAME}"
-
-    if grep -qE '\.s(rc\.)?rpm' <<<"$rpmfile"
-    then
-        rpmrelease=$(rpm -qp --queryformat="%{release}.src" "$rpmfile")
-    else
-        rpmrelease=$(rpm -qp --queryformat="%{release}.%{arch}" "$rpmfile")
-    fi
-    artifactId=$(rpm -qp --queryformat="%{name}" "$rpmfile")
-    version=$(rpm -qp --queryformat="%{version}" "$rpmfile")
-    push_file "$rpmfile" "$repoId" "$url" "${version}-${rpmrelease}" "$artifactId" rpm
-}
-
 if [ "${OS}" == "ubuntu1404" ]; then
     # Find the files
     JARS=$(find . -type f -iname '*.jar')
index cd8c798..3088e9e 100644 (file)
@@ -4,6 +4,8 @@
         - 'vpp-verify-{stream}-{os}'
         - 'vpp-merge-{stream}-{os}'
         - 'vpp-verify-image-{stream}-{os}'
+        - 'vpp-docs-merge-{stream}'
+        - 'vpp-docs-verify-{stream}'
 
     project: 'vpp'
     os:
@@ -87,6 +89,8 @@
         - ssh-agent-credentials:
             users:
                 - '{ssh-credentials}'
+        - fdio-infra-wrappers:
+            build-timeout: '{build-timeout}'
 
     triggers:
         - gerrit-trigger-patch-submitted:
             !include-raw-escape: include-raw-vpp-checkstyle.sh
         - shell:
             !include-raw-escape: include-raw-vpp-build.sh
+    publishers:
+        - archive:
+            artifacts: 'build-root/*.rpm,build-root/*.deb'
+            allow-empty: 'true'
+            fingerprint: false
+            only-if-success: true
+            default-excludes: false
 
 - job-template:
     name: 'vpp-verify-image-{stream}-{os}'
         - ssh-agent-credentials:
             users:
                 - '{ssh-credentials}'
+        - fdio-infra-wrappers:
+            build-timeout: '{build-timeout}'
 
     triggers:
         - gerrit:
         - ssh-agent-credentials:
             users:
                 - '{ssh-credentials}'
+        - fdio-infra-wrappers:
+            build-timeout: '{build-timeout}'
 
     triggers:
         - gerrit-trigger-patch-merged:
             settings-file: 'vpp-settings'
             global-settings-file: 'global-settings'
         - shell:
-            !include-raw-escape: include-raw-vpp-maven-push.sh
+            !include-raw-escape:
+                - ../scripts/maven_push_functions.sh
+                - include-raw-vpp-maven-push.sh
     publishers:
         - archive:
             artifacts: 'build-root/*.rpm,build-root/*.deb'
         - ssh-agent-credentials:
             users:
                 - '{ssh-credentials}'
+        - fdio-infra-wrappers:
+            build-timeout: '{build-timeout}'
 
     triggers:
         - gerrit-trigger-patch-submitted:
         - ssh-agent-credentials:
             users:
                 - '{ssh-credentials}'
+        - fdio-infra-wrappers:
+            build-timeout: '{build-timeout}'
 
     triggers:
         - gerrit-trigger-manually-triggered:
             name: TYPE
             default: '{type}'
             description: "TYPE parameter if not given by trigger"
+
+- job-template:
+    name: 'vpp-docs-verify-{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: '$GERRIT_REFSPEC'
+            choosing-strategy: 'gerrit'
+
+    wrappers:
+        - ssh-agent-credentials:
+            users:
+                - '{ssh-credentials}'
+        - fdio-infra-wrappers:
+            build-timeout: '{build-timeout}'
+
+    triggers:
+        - gerrit-trigger-patch-submitted:
+            name: '{project}'
+            branch: '{branch}'
+
+    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
+    publishers:
+        - archive:
+            artifacts: 'build-root/docs/html/*'
+            allow-empty: 'true'
+            fingerprint: false
+            only-if-success: true
+            default-excludes: false
+
+- job-template:
+    name: 'vpp-docs-merge-{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}'
+        - fdio-infra-wrappers:
+            build-timeout: '{build-timeout}'
+
+    triggers:
+        - reverse:
+            jobs: 'vpp-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-vpp-docs.sh
+    publishers:
+        - archive:
+            artifacts: 'build-root/docs/html/*'
+            allow-empty: 'true'
+            fingerprint: false
+            only-if-success: true
+            default-excludes: false
+
index 68d2551..c3e1c85 100644 (file)
@@ -2,6 +2,11 @@
 
 do_setup() {
     echo "127.0.1.1 $(hostname) # temporary" >> /etc/hosts
+
+    # Dead peer detection
+    echo "TCPKeepAlive        true" >> /etc/ssh/ssh_config
+    echo "ServerAliveCountMax 30"   >> /etc/ssh/ssh_config
+    echo "ServerAliveInterval 10"   >> /etc/ssh/ssh_config
 }
 
 do_mvn_install() {
@@ -139,19 +144,29 @@ deb_install_pkgs() {
     # Install virtualenv for test execution
     PACKAGES="$PACKAGES python-virtualenv python-pip python-dev"
 
+    # Install to allow the vpp-docs job to zip up docs to push them
+    PACKAGES="$PACKAGES zip"
+
+    # Install for deb_dpdk debian package buiding
+    PACKAGES="$PACKAGES dpkg-dev dh-python inkscape libcap-dev libpcap-dev"
+    PACKAGES="$PACKAGES libxen-dev libxenstore3.0 python-sphinx python-sphinx-rtd-theme"
+    PACKAGES="$PACKAGES texlive-fonts-recommended texlive-latex-extra"
+
     echo '---> Installing packages'
     # disable double quoting check
     # shellcheck disable=SC2086
     apt-get install ${PACKAGES}
 
     # Specify documentation packages
-    DOC_PACKAGES="doxygen graphviz"
+    DOC_PACKAGES="doxygen graphviz python-pyparsing"
     apt-get install ${DOC_PACKAGES}
 }
 
 deb_enable_hugepages() {
     # Setup for hugepages using sysctl so it persists across reboots
-    sysctl -w vm.nr_hugepages=1024
+    AVP="vm.nr_hugepages=1024"
+    sysctl -w ${AVP}
+    echo "${AVP}" >> /etc/sysctl.conf
 
     mkdir -p /mnt/huge
     echo "hugetlbfs       /mnt/huge  hugetlbfs       defaults        0 0" >> /etc/fstab