--- /dev/null
+#!/bin/bash
+
+set -e
+set -x
+
+./autogen.sh
+ROOT=/tmp/opflex-prefix
+./configure --prefix=$ROOT
+mkdir install-root
+DESTDIR=`pwd`/install-root make clean install
+pushd install-root
+tar -czf libuv.tgz *
+popd
--- /dev/null
+#!/bin/bash
+# Build script for openvswitch
+
+set -e
+set -x
+
+ROOT=/tmp/opflex-prefix
+DESTDIR=install-root
+
+mkdir -p "$DESTDIR"
+
+./boot.sh
+./configure --prefix="$ROOT" --enable-shared
+make -j8
+DESTDIR=`pwd`/$DESTDIR make install
+find lib ofproto -name "*.h" -exec cp --parents -t "$DESTDIR/$ROOT/include/openvswitch/" {} \;
+
+pushd $DESTDIR
+tar -czf openvswitch.tgz *
--- /dev/null
+#!/bin/bash
+# Build script for opflex
+
+set -e
+set -x
+
+ROOT=/tmp/opflex-prefix
+
+function cleanup {
+ if [ -d "$ROOT" ]; then rm -rf "$ROOT"; fi
+}
+
+# create dependency root prefix
+cleanup
+mkdir -p "$ROOT"
+trap cleanup EXIT
+
+tar -xz -C "$ROOT" --strip-components=2 -f libuv.tgz
+tar -xz -C "$ROOT" --strip-components=2 -f rapidjson.tgz
+tar -xz -C "$ROOT" --strip-components=2 -f openvswitch.tgz
+
+export PATH="$ROOT/bin:$PATH"
+export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$ROOT/lib"
+export PKG_CONFIG_PATH="$ROOT/lib/pkgconfig"
+
+# build libopflex
+pushd libopflex
+./autogen.sh
+./configure --prefix="$ROOT" \
+ --with-buildversion=$BUILD_NUMBER \
+ CPPFLAGS="-isystem $ROOT/include"
+ CXXFLAGS="-Wall"
+make -j8
+make check
+make install
+make dist
+popd
+
+# build libmodelgbp
+pushd genie
+CLASSPATH=target/classes java org.opendaylight.opflex.genie.Genie
+pushd target/libmodelgbp
+bash autogen.sh
+./configure --prefix="$ROOT"
+make -j2
+make install
+make dist
+popd
+popd
+
+# build agent-ovs
+pushd agent-ovs
+./autogen.sh
+./configure --prefix="$ROOT" \
+ --with-buildversion=$BUILD_NUMBER \
+ CPPFLAGS="-isystem $ROOT/include" \
+ CXXFLAGS="-Wall"
+make -j8
+make check
+make dist
+popd
--- /dev/null
+#!/bin/bash
+
+set -e
+set -x
+
+LIBUV_VERSION=1.5.0
+wget https://github.com/libuv/libuv/archive/v$LIBUV_VERSION.tar.gz
+mock --define="buildversion $BUILD_NUMBER" -r $MOCK_TARGET --resultdir target/srpm --buildsrpm --spec libuv.spec --sources v$LIBUV_VERSION.tar.gz
+
+RAPIDJSON_VERSION=1.0.2
+wget https://github.com/miloyip/rapidjson/archive/v$RAPIDJSON_VERSION.tar.gz
+mock --define="buildversion $BUILD_NUMBER" -r $TARGET --resultdir target/srpm --buildsrpm --spec rapidjson-devel.spec --sources v$RAPIDJSON_VERSION.tar.gz
+
+mockchain -m --define="buildversion $BUILD_NUMBER" -r $MOCK_TARGET -l target/rpm target/srpm/*.src.rpm
+find target/rpm/results -name "*.rpm" -exec mv {} . \;
--- /dev/null
+#!/bin/bash
+# Build OVS RPMs
+
+set -e
+set -x
+
+TARGET=epel-7-x86_64
+BASEKERNEL=3.10.0-229.14.1.el7.x86_64
+BVDEFINE=--define="buildversion $BUILD_NUMBER"
+KMDEFINE=--define="kversion $BASEKERNEL"
+
+./boot.sh
+./configure
+make dist
+
+SOURCE_FILE=$(ls *.tar.gz)
+
+mock -r $TARGET --resultdir target/srpm --buildsrpm --spec rhel/openvswitch-gbp-rhel.spec --sources $SOURCE_FILE "$BVDEFINE" "$KMDEFINE"
+mock -r $TARGET --resultdir target/srpm --buildsrpm --spec rhel/openvswitch-gbp-kmod-rhel.spec --sources $SOURCE_FILE "$BVDEFINE" "$KMDEFINE"
+mockchain -r $TARGET -l target/rpm -m --nocheck -m "$BVDEFINE" -m "$KMDEFINE" target/srpm/*.src.rpm
+
+find target/rpm/results -name "*.rpm" -exec mv {} . \;
--- /dev/null
+#!/bin/bash
+# Build script for rapidjson
+
+set -e
+set -x
+
+ROOT=/tmp/opflex-prefix
+DESTDIR=install-root
+
+mkdir -p "$DESTDIR/$ROOT/lib/pkgconfig"
+mkdir -p "$DESTDIR/$ROOT/include"
+
+cp -R include/rapidjson "$DESTDIR/$ROOT/include"
+sed -e "s|@INCLUDE_INSTALL_DIR@|$ROOT/include|" \
+ -e "s|@PROJECT_NAME@|RapidJSON|" \
+ -e "s|@LIB_VERSION_STRING@|1.0.1|" RapidJSON.pc.in > \
+ "$DESTDIR/$ROOT/lib/pkgconfig/RapidJSON.pc"
+
+pushd $DESTDIR
+tar -czf rapidjson.tgz *
--- /dev/null
+- project:
+ name: opflex
+ jobs:
+ - 'opflex-verify-{stream}'
+ - 'opflex-merge-{stream}'
+# - 'opflex-daily-{stream}'
+# - 'opflex-distribution-{stream}'
+
+ # stream: release stream (eg. stable-lithium or beryllium)
+ # branch: git branch (eg. stable/lithium or master)
+ stream:
+ - beryllium:
+ branch: 'master'
+ jdk: openjdk7
+ jdks:
+ - openjdk7
+
+ project: 'opflex'
+
+- builder:
+ name: opflex-build
+ builders:
+ - maven-target:
+ maven-version: '{mvn33}'
+ pom: genie/pom.xml
+ goals: compile
+ - copyartifact:
+ project: opflex-libuv_tgz-{stream}
+ flatten: true
+ - copyartifact:
+ project: opflex-rapidjson_tgz-{stream}
+ flatten: true
+ - copyartifact:
+ project: opflex-openvswitch_tgz-{stream}
+ flatten: true
+ - shell:
+ !include-raw-escape include-raw-opflex-build.sh
+
+- job-template:
+ name: 'opflex-verify-{stream}'
+
+ project-type: matrix
+ node: matrix_master
+ concurrent: true
+
+ axes:
+ - axis:
+ type: slave
+ name: nodes
+ values:
+ - dynamic_verify
+ - axis:
+ type: jdk
+ values: '{obj:jdks}'
+
+ 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}'
+ - gerrit-refspec-parameter:
+ refspec: ''
+
+ scm:
+ - gerrit-trigger-scm:
+ credentials-id: '{ssh-credentials}'
+ refspec: '$GERRIT_REFSPEC'
+ choosing-strategy: 'gerrit'
+
+ wrappers:
+ - build-timeout
+ - ssh-agent-credentials:
+ users:
+ - '{ssh-credentials}'
+
+ triggers:
+ - gerrit-trigger-patch-submitted:
+ name: 'opflex'
+ branch: '{branch}'
+
+ builders:
+ - opflex-build:
+ mvn33: '{mvn33}'
+ stream: '{stream}'
+
+ publishers:
+ - email-notification:
+ email-prefix: '[opflex]'
+
+- job-template:
+ name: 'opflex-merge-{stream}'
+
+ node: dynamic_merge
+ jdk: '{jdk}'
+
+ 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}'
+
+ scm:
+ - gerrit-trigger-scm:
+ credentials-id: '{ssh-credentials}'
+ refspec: ''
+ choosing-strategy: 'default'
+
+ wrappers:
+ - build-timeout
+ - ssh-agent-credentials:
+ users:
+ - '{ssh-credentials}'
+
+ triggers:
+ - gerrit-trigger-patch-merged:
+ name: 'opflex'
+ branch: '{branch}'
+
+ builders:
+ - opflex-build:
+ mvn33: '{mvn33}'
+ stream: '{stream}'
+
+ publishers:
+ - email-notification:
+ email-prefix: '[opflex]'
+ - archive:
+ artifacts: '**/*.tar.gz'
--- /dev/null
+- project:
+ name: opflex-dependencies-rpm
+ jobs:
+ - 'opflex-dep_rpm-{stream}'
+ - 'opflex-openvswitch_rpm-{stream}'
+
+ stream:
+ - beryllium:
+ branch: 'master'
+ jdk: openjdk7
+ jdks:
+ - openjdk7
+
+ project: 'opflex'
+
+- parameter:
+ name: mock-target-parameter
+ parameters:
+ - string:
+ name: MOCK_TARGET
+ default: 'epel-7-x86_64'
+ description: "Target architecture for mock RPM builds"
+
+- scm:
+ name: 'git-opflex-3rdparty'
+ scm:
+ - git:
+ url: https://github.com/noironetworks/3rdparty-rpm.git
+ branches:
+ - 'origin/master'
+ wipe-workspace: true
+
+- job-template:
+ name: 'opflex-dep_rpm-{stream}'
+
+ project-type: freestyle
+ node: dynamic_verify
+ 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}'
+
+ scm:
+ - git-opflex-3rdparty
+
+ wrappers:
+ - build-timeout
+ - ssh-agent-credentials:
+ users:
+ - '{ssh-credentials}'
+
+ parameters:
+ - mock-target-parameter
+
+ builders:
+ - shell:
+ !include-raw-escape include-raw-opflex-dep_rpm-build.sh
+
+ publishers:
+ - email-notification:
+ email-prefix: '[opflex]'
+ - archive:
+ artifacts: '*.rpm'
+
+- job-template:
+ name: 'opflex-openvswitch_rpm-{stream}'
+
+ project-type: freestyle
+ node: dynamic_verify
+ 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}'
+
+ scm:
+ - git-opflex-ovs
+
+ wrappers:
+ - build-timeout
+ - ssh-agent-credentials:
+ users:
+ - '{ssh-credentials}'
+
+ parameters:
+ - mock-target-parameter
+
+ builders:
+ - shell:
+ !include-raw-escape include-raw-ovs_rpm-build.sh
+
+ publishers:
+ - email-notification:
+ email-prefix: '[opflex]'
+ - archive:
+ artifacts: '*.rpm'
--- /dev/null
+- project:
+ name: opflex-dependencies
+ jobs:
+ - 'opflex-libuv_tgz-{stream}'
+ - 'opflex-rapidjson_tgz-{stream}'
+ - 'opflex-openvswitch_tgz-{stream}'
+
+ stream:
+ - beryllium:
+ branch: 'master'
+ jdk: openjdk7
+ jdks:
+ - openjdk7
+
+ project: 'opflex'
+
+- scm:
+ name: 'git-opflex-libuv'
+ scm:
+ - git:
+ url: https://github.com/libuv/libuv.git
+ branches:
+ - 'refs/tags/v1.7.5'
+ wipe-workspace: true
+
+- scm:
+ name: 'git-opflex-rapidjson'
+ scm:
+ - git:
+ url: https://github.com/miloyip/rapidjson.git
+ branches:
+ - 'refs/tags/v1.0.1'
+ wipe-workspace: true
+
+- scm:
+ name: 'git-opflex-ovs'
+ scm:
+ - git:
+ url: https://github.com/noironetworks/ovs.git
+ branches:
+ - 'origin/noiro'
+ wipe-workspace: true
+
+- job-template:
+ name: 'opflex-libuv_tgz-{stream}'
+
+ project-type: freestyle
+ node: dynamic_verify
+ 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}'
+
+ scm:
+ - git-opflex-libuv
+
+ wrappers:
+ - build-timeout
+ - ssh-agent-credentials:
+ users:
+ - '{ssh-credentials}'
+
+ builders:
+ - shell:
+ !include-raw-escape include-raw-libuv_tgz-build.sh
+
+ publishers:
+ - email-notification:
+ email-prefix: '[opflex]'
+ - archive:
+ artifacts: 'install-root/*.tgz'
+
+- job-template:
+ name: 'opflex-rapidjson_tgz-{stream}'
+
+ project-type: freestyle
+ node: dynamic_verify
+ 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}'
+
+ scm:
+ - git-opflex-rapidjson
+
+ wrappers:
+ - build-timeout
+ - ssh-agent-credentials:
+ users:
+ - '{ssh-credentials}'
+
+ builders:
+ - shell:
+ !include-raw-escape include-raw-rapidjson_tgz-build.sh
+
+ publishers:
+ - email-notification:
+ email-prefix: '[opflex]'
+ - archive:
+ artifacts: 'install-root/*.tgz'
+
+- job-template:
+ name: 'opflex-openvswitch_tgz-{stream}'
+
+ project-type: freestyle
+ node: dynamic_verify
+ concurrent: true
+
+ axes:
+ - axis:
+ type: slave
+ name: nodes
+ values:
+ - dynamic_verify
+ - axis:
+ type: jdk
+ values: '{obj:jdks}'
+
+ logrotate:
+ daysToKeep: '{build-days-to-keep}'
+ numToKeep: '{build-num-to-keep}'
+ artifactDaysToKeep: '{build-artifact-days-to-keep}'
+ artifactNumToKeep: '{build-artifact-num-to-keep}'
+
+ scm:
+ - git-opflex-ovs
+
+ wrappers:
+ - build-timeout
+ - ssh-agent-credentials:
+ users:
+ - '{ssh-credentials}'
+
+ builders:
+ - shell:
+ !include-raw-escape include-raw-openvswitch_tgz-build.sh
+
+ publishers:
+ - email-notification:
+ email-prefix: '[opflex]'
+ - archive:
+ artifacts: 'install-root/*.tgz'