summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorkhilman <khilman@users.noreply.github.com>2018-02-02 10:24:49 -0800
committerGitHub <noreply@github.com>2018-02-02 10:24:49 -0800
commite3b883de8c99832687aeb5950f2114a992541d75 (patch)
treeb6a41fadc6f405c6517b5f87be62af98f00602cf /common
parent3177c39ace236c22bf7d29ebac13e0b73f4ae39f (diff)
parente93a8b174964a1cff91bfe3da8560ae3bdc41a8e (diff)
Merge pull request #15 from montjoie/lavastable
stick to 2017.11
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 $?