aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/build-lava124
1 files changed, 124 insertions, 0 deletions
diff --git a/common/build-lava b/common/build-lava
new file mode 100644
index 0000000..e1a8e3b
--- /dev/null
+++ b/common/build-lava
@@ -0,0 +1,124 @@
+#!/bin/sh
+# This file is copied in {lava-master/lava-slave}/scripts
+
+if [ $# -le 1 ];then
+ echo "Build any LAVA compoments from source with specific version tag"
+ echo "Usage: $0 LAVAcompoment LAVA-git-tag LAVA-pkg-git-tag"
+ exit 1
+fi
+
+# common build deps
+DEBIAN_FRONTEND=noninteractive apt-get -y install python3-sphinx git devscripts || exit $?
+
+case $1 in
+lava-server)
+ # package dependencies
+ DEBIAN_FRONTEND=noninteractive apt-get -y install \
+ python-mock \
+ apache2 \
+ debootstrap \
+ ntfs-3g \
+ debhelper \
+ debootstrap \
+ libguestfs-tools \
+ build-essential \
+ docbook-xsl \
+ xsltproc \
+ gunicorn \
+ ntp \
+ nodejs \
+ node-uglify \
+ libjs-excanvas \
+ libjs-jquery-cookie \
+ libjs-jquery-watermark \
+ libjs-jquery-flot \
+ libjs-jquery-ui \
+ python-django \
+ python-json-schema-validator \
+ python-configglue \
+ python-twisted\
+ python-guestfs \
+ python-configobj \
+ python-lzma \
+ python-magic \
+ python-netifaces \
+ python-nose \
+ python-pexpect \
+ python-pyudev \
+ python-requests \
+ python-yaml \
+ python-zmq \
+ python3-sphinx-bootstrap-theme \
+ pep8 \
+ python-pep8 \
+ python-voluptuous \
+ python-dateutil \
+ python-django-auth-ldap \
+ python-django-restricted-resource \
+ python-django-tables2 \
+ python-docutils \
+ python-jinja2 \
+ python-markdown \
+ python-psycopg2 \
+ python-voluptuous \
+ python-sphinx \
+ python-sphinx-bootstrap-theme \
+ python-mocker \
+ systemd-sysv \
+ tftpd-hpa \
+ lxc \
+ sudo \
+ telnet \
+ bridge-utils || exit $?
+
+ DEBIAN_FRONTEND=noninteractive apt-get -y install lava-tool lavapdu-client lava-coordinator || exit $?
+;;
+lava-dispatcher)
+ # build dependencies
+ DEBIAN_FRONTEND=noninteractive apt-get -y install python-setuptools || exit $?
+ # package dependencies
+ DEBIAN_FRONTEND=noninteractive apt-get -y install python-serial \
+ python-daemon \
+ python-guestfs \
+ sudo \
+ telnet \
+ python-configobj \
+ python-lzma \
+ python-magic \
+ python-netifaces \
+ python-nose \
+ python-pexpect \
+ python-pyudev \
+ python-requests \
+ python-tz \
+ python-yaml \
+ python-zmq || exit $?
+;;
+*)
+ echo "Unknow compoments $1"
+ exit 1
+;;
+esac
+if [ ! -e /root/lava-server ];then
+ git clone https://github.com/Linaro/lava-server.git /root/lava-server || exit $?
+fi
+cd /root/lava-server
+git checkout $2 || exit $?
+
+if [ ! -e /root/$1 ];then
+ git clone https://github.com/Linaro/$1.git /root/$1 || exit $?
+fi
+cd /root/$1
+git checkout $2 || exit $?
+
+git config --global user.name "Docker Build"
+git config --global user.email "info@kernelci.org"
+
+# By default, debian-dev-build.sh use always the last tag as version
+sed -i "s,VERSION=.*,VERSION=$3," /root/lava-server/share/debian-dev-build.sh
+
+echo "cd \${DIR} && dpkg -i *.deb" >> /root/lava-server/share/debian-dev-build.sh
+
+cd /root/$1
+/root/lava-server/share/debian-dev-build.sh -p $1 -b $3
+exit $?