Skip to content
Maddalena, Art edited this page Sep 23, 2016 · 3 revisions

The Jenkins job that we use to build locally is below; Feedback is welcome.

  • We have github tell us to build
  • Currently we only have one global jenkins build number, someday we may do per branch per major.minor ... maybe
  • We build to /nids/moloch for historical reasons
if [ "$GIT_BRANCH" = "origin/master" ]; then
    NAME="moloch"
else
    NAME="moloch-${GIT_BRANCH:7}"
fi
# For every build we wipe out the install
rm -rf /nids/$NAME

# we previously built all the libraries in placed in /home/jenkins/files
./configure --prefix=/nids/$NAME --with-libpcap=/home/jenkins/files/libpcap \
--with-yara=/home/jenkins/files/yara --with-GeoIP=/home/jenkins/files/GeoIP \
--with-glib2=/home/jenkins/files/glib-2 --with-curl=/home/jenkins/files/curl \
--with-lua=/home/jenkins/files/lua

# Copy in our private plugins
# cp -f /home/jenkins/plugins/*.c capture/plugins/

make clean
make
(cd capture/plugins/lua ; make)

# You don't have to run the tests, but we do
(cd tests; ./tests.pl)

make install
cp -r capture/plugins/lua/samples /nids/$NAME/lua

VERSION=`sed 's/.*"\(.*\)\".*$/\1/' /nids/$NAME/viewer/version.js | tr "-" "_"`
fpm -s dir -t rpm -n $NAME -v $VERSION --iteration $BUILD_NUMBER /nids/$NAME
# publish the rpm here

Clone this wiki locally