[PATCH] osmo-gsm-tester[master]: contrib: add jenkins-build-osmo-hlr.sh

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Mon May 22 21:50:21 UTC 2017


Review at  https://gerrit.osmocom.org/2718

contrib: add jenkins-build-osmo-hlr.sh

Change-Id: I07ca99c57eb1c47a3f83673502c8ec638e7e42b2
---
A contrib/jenkins-build-osmo-hlr.sh
1 file changed, 69 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/18/2718/1

diff --git a/contrib/jenkins-build-osmo-hlr.sh b/contrib/jenkins-build-osmo-hlr.sh
new file mode 100755
index 0000000..6fbebab
--- /dev/null
+++ b/contrib/jenkins-build-osmo-hlr.sh
@@ -0,0 +1,69 @@
+#!/bin/sh
+set -e -x
+
+base="$PWD"
+prefix="$base/inst-osmo-hlr"
+
+rm -f "$base/osmo-hlr*.tgz"
+
+git_url="git://git.osmocom.org"
+
+have_repo() {
+	repo="$1"
+	branch="${2-master}"
+
+	cd "$base"
+	if [ ! -d "$repo" ]; then
+		git clone "$git_url/$repo" -b "$branch" "$repo"
+	fi
+	cd "$repo"
+	rm -rf *
+	git fetch origin
+	git checkout .
+	git checkout "$branch"
+	git reset --hard origin/"$branch"
+	git rev-parse HEAD
+
+	cd "$base"
+}
+
+build_repo() {
+	dep="$1"
+	branch="${2-master}"
+
+	have_repo "$dep" "$branch"
+
+	cd "$dep"
+
+	echo "$(git rev-parse HEAD) $dep" >> "$prefix/osmo-hlr_git_hashes.txt"
+
+	config_opts=""
+
+	autoreconf -fi
+	./configure --prefix="$prefix" $config_opts
+	make -j8
+	make install
+}
+
+rm -rf "$prefix"
+mkdir -p "$prefix"
+
+export PKG_CONFIG_PATH="$prefix/lib/pkgconfig"
+export LD_LIBRARY_PATH="$prefix/lib"
+
+build_repo libosmocore
+build_repo libosmo-abis
+build_repo osmo-hlr
+
+# don't package documentation -- the libosmocore docs can be up to 16 Mb large,
+# a significant amount compared to the binaries
+rm -rf "$prefix/share/doc/libosmocore"
+
+# build the archive that is going to be copied to the tester
+rm "$base"/*.tgz "$base"/*.md5 || true
+cd "$prefix"
+this="osmo-hlr.build-${BUILD_NUMBER-$(date +%Y-%m-%d_%H_%M_%S)}"
+tar="${this}.tgz"
+tar czf "$base/$tar" *
+cd "$base"
+md5sum "$tar" > "${this}.md5"

-- 
To view, visit https://gerrit.osmocom.org/2718
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I07ca99c57eb1c47a3f83673502c8ec638e7e42b2
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list