Adding debugging information and support for radio emulation packages. 75/6075/3
authorMauro Sardara <msardara+fdio@cisco.com>
Thu, 6 Apr 2017 18:16:16 +0000 (20:16 +0200)
committerEd Warnicke <hagbard@gmail.com>
Fri, 7 Apr 2017 08:15:31 +0000 (08:15 +0000)
Change-Id: Icb079abec6fc3b1a59c8764d0b122dca4ffe40a4
Signed-off-by: Mauro Sardara <msardara+fdio@cisco.com>
13 files changed:
jjb/cicn/build-package.sh
jjb/cicn/cicn.yaml
jjb/cicn/include-raw-cicn-http-server-build.sh
jjb/cicn/include-raw-cicn-libccnx-common-build.sh
jjb/cicn/include-raw-cicn-libccnx-portal-build.sh
jjb/cicn/include-raw-cicn-libccnx-transport-rta-build.sh
jjb/cicn/include-raw-cicn-libicnet-build.sh
jjb/cicn/include-raw-cicn-libparc-build.sh
jjb/cicn/include-raw-cicn-longbow-build.sh
jjb/cicn/include-raw-cicn-metis-build.sh
jjb/cicn/include-raw-cicn-radio-emulators-build.sh [new file with mode: 0644]
jjb/cicn/include-raw-cicn-viper-build.sh
jjb/cicn/include-raw-cicn-vpp-plugin-build.sh

index 9abedf5..30b7e70 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/bash
 # basic build script example
-set -euo pipefail
+set -euxo pipefail
 IFS=$'\n\t'
 
 apt_get=`which apt-get`
@@ -224,6 +224,8 @@ build_package() {
     cmake -DCMAKE_INSTALL_PREFIX=/usr -DRPM_PACKAGE=$RPM -DDEB_PACKAGE=$DEB -DDISTRIBUTION=$DISTRIB_CODENAME -DARCHITECTURE=$ARCHITECTURE ..
     make package
 
+    popd
+
     echo "*******************************************************************"
     echo "* $PACKAGE_NAME BUILD SUCCESSFULLY COMPLETED"
     echo "*******************************************************************"
index 78ec57f..e6ecccb 100644 (file)
@@ -13,7 +13,7 @@
     stream:
         - master:
             branch: 'cframework/master'
-            repo-stream-part: 'cicn.master'
+            repo-stream-part: 'master'
     type:
         - short
         - long
@@ -33,7 +33,7 @@
     stream:
         - master:
             branch: 'cframework/libparc'
-            repo-stream-part: 'cicn.master'
+            repo-stream-part: 'master'
     type:
         - short
         - long
@@ -53,7 +53,7 @@
     stream:
         - master:
             branch: 'ccnxlibs/master'
-            repo-stream-part: 'cicn.master'
+            repo-stream-part: 'master'
     type:
         - short
         - long
@@ -73,7 +73,7 @@
     stream:
         - master:
             branch: 'ccnxlibs/master'
-            repo-stream-part: 'cicn.master'
+            repo-stream-part: 'master'
     type:
         - short
         - long
@@ -93,7 +93,7 @@
     stream:
         - master:
             branch: 'ccnxlibs/master'
-            repo-stream-part: 'cicn.master'
+            repo-stream-part: 'master'
     type:
         - short
         - long
     stream:
         - master:
             branch: 'libicnet/master'
-            repo-stream-part: 'cicn.master'
+            repo-stream-part: 'master'
     type:
         - short
         - long
     stream:
         - master:
             branch: 'sb-forwarder/master'
-            repo-stream-part: 'cicn.master'
+            repo-stream-part: 'master'
     type:
         - short
         - long
     stream:
         - master:
             branch: 'http-server/master'
-            repo-stream-part: 'cicn.master'
+            repo-stream-part: 'master'
     type:
         - short
         - long
     stream:
         - master:
             branch: 'cicn-plugin/master'
-            repo-stream-part: 'cicn.master'
+            repo-stream-part: 'master'
     type:
         - short
         - long
     stream:
         - master:
             branch: 'viper/master'
-            repo-stream-part: 'cicn.master'
+            repo-stream-part: 'master'
+    type:
+        - short
+        - long
+
+- project:
+    name: cicn-radio-emulators
+    jobs:
+        - 'cicn-radio-emulators-merge-{stream}-{os}'
+    project: 'cicn'
+    os:
+        - ubuntu1604:
+            repo-os-part: 'ubuntu.xenial.main'
+    stream:
+        - master:
+            branch: 'vicn/master'
+            repo-stream-part: 'master'
     type:
         - short
         - long
                 - build-package.sh
                 - include-raw-cicn-longbow-build.sh
         - provide-maven-settings:
-            settings-file: 'cicn-longbow-settings'
+            settings-file: 'cicn-settings'
             global-settings-file: 'global-settings'
         - shell:
             !include-raw-escape:
                 - build-package.sh
                 - include-raw-cicn-libparc-build.sh
         - provide-maven-settings:
-            settings-file: 'cicn-libparc-settings'
+            settings-file: 'cicn-settings'
             global-settings-file: 'global-settings'
         - shell:
             !include-raw-escape:
                 - build-package.sh
                 - include-raw-cicn-libccnx-common-build.sh
         - provide-maven-settings:
-            settings-file: 'cicn-libccnx-common-settings'
+            settings-file: 'cicn-settings'
             global-settings-file: 'global-settings'
         - shell:
             !include-raw-escape:
                 - build-package.sh
                 - include-raw-cicn-libccnx-transport-rta-build.sh
         - provide-maven-settings:
-            settings-file: 'cicn-libccnx-transport-rta-settings'
+            settings-file: 'cicn-settings'
             global-settings-file: 'global-settings'
         - shell:
             !include-raw-escape:
                 - build-package.sh
                 - include-raw-cicn-libccnx-portal-build.sh
         - provide-maven-settings:
-            settings-file: 'cicn-libccnx-portal-settings'
+            settings-file: 'cicn-settings'
             global-settings-file: 'global-settings'
         - shell:
             !include-raw-escape:
                 - build-package.sh
                 - include-raw-cicn-libicnet-build.sh
         - provide-maven-settings:
-            settings-file: 'cicn-libicnet-settings'
+            settings-file: 'cicn-settings'
             global-settings-file: 'global-settings'
         - shell:
             !include-raw-escape:
                 - build-package.sh
                 - include-raw-cicn-metis-build.sh
         - provide-maven-settings:
-            settings-file: 'cicn-metis-settings'
+            settings-file: 'cicn-settings'
             global-settings-file: 'global-settings'
         - shell:
             !include-raw-escape:
                 - build-package.sh
                 - include-raw-cicn-http-server-build.sh
         - provide-maven-settings:
-            settings-file: 'cicn-http-server-settings'
+            settings-file: 'cicn-settings'
             global-settings-file: 'global-settings'
         - shell:
             !include-raw-escape:
                 - build-package.sh
                 - include-raw-cicn-http-server-build.sh
         - provide-maven-settings:
-            settings-file: 'cicn-vpp-plugin-settings'
+            settings-file: 'cicn-settings'
             global-settings-file: 'global-settings'
         - shell:
             !include-raw-escape:
                 - build-package.sh
                 - include-raw-cicn-viper-build.sh
         - provide-maven-settings:
-            settings-file: 'cicn-viper-settings'
+            settings-file: 'cicn-settings'
             global-settings-file: 'global-settings'
         - shell:
             !include-raw-escape:
             fingerprint: false
             only-if-success: true
             default-excludes: false
+        - fdio-infra-shiplogs:
+            maven-version: 'mvn33-new'
+
+- job-template:
+    name: 'cicn-radio-emulators-merge-{stream}-{os}'
+
+    project-type: freestyle
+    node: '{os}-basebuild-4c-4g'
+
+    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}'
+        - maven-project-parameter:
+            maven: 'mvn33-new'
+        - maven-exec:
+            maven-version: 'mvn33-new'
+        - repo-name-parameter:
+            repo-name: '{repo-stream-part}.{repo-os-part}'
+
+    scm:
+        - gerrit-trigger-scm:
+            credentials-id: 'jenkins-gerrit-credentials'
+            refspec: ''
+            choosing-strategy: 'default'
+
+    wrappers:
+        - fdio-infra-wrappers:
+            build-timeout: '{build-timeout}'
+
+    triggers:
+        - timed: '@daily'
+
+    builders:
+        - maven-target:
+            maven-version: 'mvn33-new'
+            goals: '--version'
+            settings: 'cicn-settings'
+            settings-type: cfp
+            global-settings: 'global-settings'
+            global-settings-type: cfp
+        - shell:
+            !include-raw-escape:
+                - build-package.sh
+                - include-raw-cicn-radio-emulators-build.sh
+        - provide-maven-settings:
+            settings-file: 'cicn-settings'
+            global-settings-file: 'global-settings'
+        - shell:
+            !include-raw-escape:
+                - ../scripts/maven_push_functions.sh
+                - include-raw-cicn-maven-push.sh
+    publishers:
+        - archive:
+            artifacts: 'emu-radio/build/*.rpm,emu-radio/build/*.deb,emu-radio/ns3-packages/*.rpm,emu-radio/ns3-packages/*.deb'
+            allow-empty: 'true'
+            fingerprint: false
+            only-if-success: true
+            default-excludes: false
         - fdio-infra-shiplogs:
             maven-version: 'mvn33-new'
\ No newline at end of file
index 873889f..d75b6c7 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/bash
 # basic build script example
-set -euo pipefail
+set -euxo pipefail
 IFS=$'\n\t'
 
 PACKAGE_NAME="HTTP_SERVER"
index 195b5fc..43bad9d 100644 (file)
@@ -1,9 +1,10 @@
 #!/bin/bash
 # basic build script example
-set -euo pipefail
+set -euxo pipefail
 IFS=$'\n\t'
 
 PACKAGE_NAME="LIBCCNX_COMMON"
 PACKAGE_DEPS="LIBCCNX_COMMON_DEPS"
-cd libccnx-common
+pushd libccnx-common
 build_package $PACKAGE_NAME $PACKAGE_DEPS
+popd
index 6bd210a..e5e4809 100644 (file)
@@ -1,9 +1,10 @@
 #!/bin/bash
 # basic build script example
-set -euo pipefail
+set -euxo pipefail
 IFS=$'\n\t'
 
 PACKAGE_NAME="LIBCCNX_PORTAL"
 PACKAGE_DEPS="LIBCCNX_PORTAL_DEPS"
-cd libccnx-portal
+pushd libccnx-portal
 build_package $PACKAGE_NAME $PACKAGE_DEPS
+popd
index eaa9be9..74c3095 100644 (file)
@@ -1,9 +1,10 @@
 #!/bin/bash
 # basic build script example
-set -euo pipefail
+set -euxo pipefail
 IFS=$'\n\t'
 
 PACKAGE_NAME="LIBCCNX_TRANSPORT_RTA"
 PACKAGE_DEPS="LIBCCNX_TRANSPORT_RTA_DEPS"
-cd libccnx-transport-rta
+pushd libccnx-transport-rta
 build_package $PACKAGE_NAME $PACKAGE_DEPS
+popd
index 3b752e7..9b8be60 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/bash
 # basic build script example
-set -euo pipefail
+set -euxo pipefail
 IFS=$'\n\t'
 
 PACKAGE_NAME="LIBICNET"
index e77a3bc..74513fd 100644 (file)
@@ -1,9 +1,10 @@
 #!/bin/bash
 # basic build script example
-set -euo pipefail
+set -euxo pipefail
 IFS=$'\n\t'
 
 PACKAGE_NAME="LIBPARC"
 PACKAGE_DEPS="LIBPARC_DEPS"
-cd libparc
+pushd libparc
 build_package $PACKAGE_NAME $PACKAGE_DEPS
+popd
index b44f306..73c65d7 100644 (file)
@@ -1,9 +1,10 @@
 #!/bin/bash
 # basic build script example
-set -euo pipefail
+set -euxo pipefail
 IFS=$'\n\t'
 
 PACKAGE_NAME="LONGBOW"
 PACKAGE_DEPS="LONGBOW_DEPS"
-cd longbow
+pushd longbow
 build_package $PACKAGE_NAME $PACKAGE_DEPS
+popd
\ No newline at end of file
index a8bd67a..03d4262 100644 (file)
@@ -1,9 +1,10 @@
 #!/bin/bash
 # basic build script example
-set -euo pipefail
+set -euxo pipefail
 IFS=$'\n\t'
 
 PACKAGE_NAME="METIS"
 PACKAGE_DEPS="METIS_DEPS"
-cd metis
+pushd metis
 build_package $PACKAGE_NAME $PACKAGE_DEPS
+popd
\ No newline at end of file
diff --git a/jjb/cicn/include-raw-cicn-radio-emulators-build.sh b/jjb/cicn/include-raw-cicn-radio-emulators-build.sh
new file mode 100644 (file)
index 0000000..72c663a
--- /dev/null
@@ -0,0 +1,87 @@
+#!/bin/bash
+# basic build script example
+set -euxo pipefail
+IFS=$'\n\t'
+
+apt_get=`which apt-get`
+
+PACKAGE_NAME="RADIO_EMULATOR"
+RADIO_EMULATOR_DEPS_UBUNTU="pkg-config libboost-all-dev libsqlite3-dev libopenmpi-dev libxml2-dev libwebsocketpp-dev"
+
+BUILD_TOOLS="build-essential cmake"
+
+ARCHITECTURE=`uname -m`
+
+# Figure out what system we are running on
+if [ -f /etc/lsb-release ];then
+
+    . /etc/lsb-release
+    DEB=ON
+    RPM=OFF
+
+    if [ "$ARCHITECTURE" == "x86_64" ]; then
+        ARCHITECTURE="amd64"
+    fi
+
+elif [ -f /etc/redhat-release ];then
+
+    sudo yum install -y redhat-lsb
+    DISTRIB_ID=`lsb_release -si`
+    DISTRIB_RELEASE=`lsb_release -sr`
+    DISTRIB_CODENAME=`lsb_release -sc`
+    DISTRIB_DESCRIPTION=`lsb_release -sd`
+
+    DEB=OFF
+    RPM=ON
+else
+    echo "ERROR: System configuration not recognized. Build failed"
+    exit -1
+fi
+
+echo ARCHITECTURE: $ARCHITECTURE
+echo DISTRIB_ID: $DISTRIB_ID
+echo DISTRIB_RELEASE: $DISTRIB_RELEASE
+echo DISTRIB_CODENAME: $DISTRIB_CODENAME
+echo DISTRIB_DESCRIPTION: $DISTRIB_DESCRIPTION
+
+setup $DISTRIB_ID $DISTRIB_CODENAME
+
+# Install deps
+
+if [ $DISTRIB_ID == "Ubuntu" ]; then
+    echo $BUILD_TOOLS $RADIO_EMULATOR_DEPS_UBUNTU | xargs sudo ${apt_get} install -y --allow-unauthenticated || true
+else
+    echo "This package is currently supported only for ubuntu. Exiting.."
+    exit -1
+fi
+
+# Parameters
+# $1 = WIFI / LTE
+#
+build() {
+    PARAM=$1
+    mkdir -p build
+    cd build
+    ls | grep -v *.deb | xargs rm -rf || true
+    echo $PARAM | xargs cmake -DCMAKE_INSTALL_PREFIX=/usr -DRPM_PACKAGE=$RPM -DDEB_PACKAGE=$DEB -DDISTRIBUTION=$DISTRIB_CODENAME -DARCHITECTURE=$ARCHITECTURE ..
+    make
+}
+
+# Install libns3
+
+pushd emu-radio/ns3-packages
+sudo dpkg -i *.deb || true
+sudo apt-get -f install -y --allow-unauthenticated || true
+popd
+
+# Build wifi-emualtor
+pushd emu-radio
+build "-DWIFI=ON -DLTE=OFF"
+make package
+popd
+
+# Build lte-emualtor
+pushd emu-radio
+build "-DLTE=ON -DWIFI=OFF"
+make package
+popd
\ No newline at end of file
index 0585d28..149b771 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/bash
 # basic build script example
-set -euo pipefail
+set -euxo pipefail
 IFS=$'\n\t'
 
 apt_get=`which apt-get`
@@ -92,5 +92,7 @@ sudo make install
 popd
 
 # Build viper
+pushd .
 build
 make package
+popd
index c338c2c..1da7b47 100644 (file)
@@ -1,11 +1,11 @@
 #!/bin/bash
 # basic build script example
-set -euo pipefail
+set -exuo pipefail
 IFS=$'\n\t'
 
 PACKAGE_NAME="VPP_PLUGIN"
 PACKAGE_DEPS="VPP_PLUGIN_DEPS"
 
-cd cicn-plugin
-
+pushd cicn-plugin
 build_package $PACKAGE_NAME $PACKAGE_DEPS
+popd
\ No newline at end of file