Add jobs for deb_dpdk 82/2982/7
authorEd Warnicke <eaw@cisco.com>
Tue, 20 Sep 2016 13:52:18 +0000 (06:52 -0700)
committerEd Warnicke <eaw@cisco.com>
Tue, 20 Sep 2016 14:39:14 +0000 (07:39 -0700)
Please make sure to create repos:

fdio.deb_dpdk_1607.ubuntu.trusty.main
fdio.deb_dpdk_1607.ubuntu.xenial.main

For the merge job to publish to.

Change-Id: I196c85912324c7dfe872d005bd898fa8b340fdca
Signed-off-by: Ed Warnicke <eaw@cisco.com>
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]
vagrant/lib/bootstrap-functions.sh

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..f904631
--- /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
+
+apt-get install `dpkg-checkbuilddeps |& sed "s/dpkg-checkbuilddeps: Unmet build dependencies://g"`
+
+debuild -uc -us -j4
+
+echo "*******************************************************************"
+echo "* DEB_DPDK BUILD SUCCESSFULLY COMPLETED"
+echo "*******************************************************************"
\ No newline at end of file
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 71fa062..52aebea 100644 (file)
@@ -142,6 +142,11 @@ deb_install_pkgs() {
     # 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