[MERGED] osmo-bts[master]: jenkins helpers: some minimal documentation/comments + print...

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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Mon Jul 10 13:06:20 UTC 2017


Harald Welte has submitted this change and it was merged.

Change subject: jenkins helpers: some minimal documentation/comments + print errors
......................................................................


jenkins helpers: some minimal documentation/comments + print errors

We should print meaningful error messages in case a user doesn't have
the required local PATH set up, or doesn't specify a required command
line argument.

Change-Id: I30a2935f93ade69222b1e0c3e212ee10e17c1823
---
M contrib/jenkins_bts_model.sh
M contrib/jenkins_bts_trx.sh
M contrib/jenkins_common.sh
M contrib/jenkins_lc15.sh
M contrib/jenkins_oct.sh
M contrib/jenkins_oct_and_bts_trx.sh
M contrib/jenkins_sysmobts.sh
7 files changed, 22 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/contrib/jenkins_bts_model.sh b/contrib/jenkins_bts_model.sh
index c44daa7..33bfdc7 100755
--- a/contrib/jenkins_bts_model.sh
+++ b/contrib/jenkins_bts_model.sh
@@ -1,6 +1,14 @@
 #!/bin/sh
+# this is a dispatcher script which will call the bts-model-specific
+# script based on the bts model specified as command line argument
+
 bts_model="$1"
 
+if [ "x$bts_model" == "x" ]; then
+	echo "Error: You have to specify the BTS model as first argument, e.g. $0 sysmo"
+	exit 2
+fi
+
 if [ ! -d "./contrib" ]; then
   echo "Run ./contrib/jenkins_bts_model.sh from the root of the osmo-bts tree"
   exit 1
diff --git a/contrib/jenkins_bts_trx.sh b/contrib/jenkins_bts_trx.sh
index 076a4ff..9e95809 100755
--- a/contrib/jenkins_bts_trx.sh
+++ b/contrib/jenkins_bts_trx.sh
@@ -1,4 +1,5 @@
 #!/bin/sh
+# jenkins build helper script for osmo-bts-trx
 
 # shellcheck source=contrib/jenkins_common.sh
 . $(dirname "$0")/jenkins_common.sh
diff --git a/contrib/jenkins_common.sh b/contrib/jenkins_common.sh
index 824dd43..bce771d 100644
--- a/contrib/jenkins_common.sh
+++ b/contrib/jenkins_common.sh
@@ -1,5 +1,14 @@
 #!/bin/sh
 
+# this is a common helper script that is shared among all BTS model
+# specific helper scripts like jenkins_sysmobts.sh.  You shouldn't call
+# this directly, but rather indirectly via the bts-specific scripts
+
+if ! [ -x "$(command -v osmo-deps.sh)" ]; then
+	echo "Error: We need to have scripts/osmo-deps.sh from http://git.osmocom.org/osmo-ci/ in PATH !"
+	exit 2
+fi
+
 set -ex
 
 base="$PWD"
diff --git a/contrib/jenkins_lc15.sh b/contrib/jenkins_lc15.sh
index af335d5..a2d9514 100755
--- a/contrib/jenkins_lc15.sh
+++ b/contrib/jenkins_lc15.sh
@@ -1,4 +1,5 @@
 #!/bin/sh
+# jenkins build helper script for osmo-bts-lc15
 
 # shellcheck source=contrib/jenkins_common.sh
 . $(dirname "$0")/jenkins_common.sh
diff --git a/contrib/jenkins_oct.sh b/contrib/jenkins_oct.sh
index 6ad5358..b3dc07f 100755
--- a/contrib/jenkins_oct.sh
+++ b/contrib/jenkins_oct.sh
@@ -1,4 +1,5 @@
 #!/bin/sh
+# jenkins build helper script for osmo-bts-octphy
 
 # shellcheck source=contrib/jenkins_common.sh
 . $(dirname "$0")/jenkins_common.sh
diff --git a/contrib/jenkins_oct_and_bts_trx.sh b/contrib/jenkins_oct_and_bts_trx.sh
index a8a8004..c23009d 100755
--- a/contrib/jenkins_oct_and_bts_trx.sh
+++ b/contrib/jenkins_oct_and_bts_trx.sh
@@ -1,4 +1,5 @@
 #!/bin/sh
+# jenkins build helper script for osmo-bts-octphy + osmo-bts-trx
 
 # shellcheck source=contrib/jenkins_common.sh
 . $(dirname "$0")/jenkins_common.sh
diff --git a/contrib/jenkins_sysmobts.sh b/contrib/jenkins_sysmobts.sh
index 227f249..6645181 100755
--- a/contrib/jenkins_sysmobts.sh
+++ b/contrib/jenkins_sysmobts.sh
@@ -1,4 +1,5 @@
 #!/bin/sh
+# jenkins build helper script for osmo-bts-sysmo
 
 # shellcheck source=contrib/jenkins_common.sh
 . $(dirname "$0")/jenkins_common.sh

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I30a2935f93ade69222b1e0c3e212ee10e17c1823
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list