btrfs-progs: ci: add support scripts for docker build
authorDavid Sterba <dsterba@suse.com>
Thu, 8 Feb 2018 00:24:25 +0000 (01:24 +0100)
committerDavid Sterba <dsterba@suse.com>
Thu, 8 Feb 2018 00:24:25 +0000 (01:24 +0100)
The test-build resides inside the docker image and is supposed to be
called from outside, downloads the branch and calls build-default.
Buid-default will run up to make.

Signed-off-by: David Sterba <dsterba@suse.com>
travis/build-default [new file with mode: 0755]
travis/images/test-build [new file with mode: 0755]

diff --git a/travis/build-default b/travis/build-default
new file mode 100755 (executable)
index 0000000..b43302d
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+# usage: $0 [optional arguments to configure]
+
+if ! [ -f "./autogen.sh" ]; then
+       echo "ERROR: cannot find autogen.sh, run from the top level directory"
+       exit 1
+fi
+
+set -e
+
+./autogen.sh
+./configure "$@"
+make
diff --git a/travis/images/test-build b/travis/images/test-build
new file mode 100755 (executable)
index 0000000..2f05fbf
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+# usage: $0 [branch name] [configure parameters]
+
+urlbase="https://github.com/kdave/btrfs-progs/archive/"
+branch=${1:-devel}
+url=${urlbase}${branch}.tar.gz
+
+shift
+
+echo "btrfs-progs build test of branch ${branch}"
+cd /tmp
+wget "$url" -O ${branch}.tar.gz
+tar xf ${branch}.tar.gz
+cd btrfs-progs-${branch}
+travis/build-default "$@"