Change in osmo-ci[master]: OBS: move verify_feed to common

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

osmith gerrit-no-reply at lists.osmocom.org
Tue May 18 07:35:15 UTC 2021


osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/24254 )


Change subject: OBS: move verify_feed to common
......................................................................

OBS: move verify_feed to common

Prepare to move the 2021q1 feed from latest to nightly.

Related: SYS#5370
Change-Id: I91e4c36d4a04d465fc9ccb933e8060511b7cd145
---
M scripts/common-obs.sh
M scripts/osmocom-latest-packages.sh
M scripts/osmocom-nightly-packages.sh
3 files changed, 21 insertions(+), 19 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/54/24254/1

diff --git a/scripts/common-obs.sh b/scripts/common-obs.sh
index 34f2549..3a5c0c1 100644
--- a/scripts/common-obs.sh
+++ b/scripts/common-obs.sh
@@ -280,3 +280,17 @@
 
 	echo -n "$version"
 }
+
+# Verify that $FEED is in $FEEDS
+osmo_obs_verify_feed() {
+	local i
+
+	for i in $FEEDS; do
+		if [ "$i" = "$FEED" ]; then
+			return
+		fi
+	done
+
+	echo "unsupported feed: $FEED"
+	exit 1
+}
diff --git a/scripts/osmocom-latest-packages.sh b/scripts/osmocom-latest-packages.sh
index d942e9d..31fc877 100755
--- a/scripts/osmocom-latest-packages.sh
+++ b/scripts/osmocom-latest-packages.sh
@@ -24,19 +24,6 @@
 DEBSRCDIR="$TOP/debsrc"
 FEED="${FEED:-latest}"
 
-verify_feed() {
-  local i
-
-  for i in $FEEDS; do
-    if [ "$i" = "$FEED" ]; then
-      return
-    fi
-  done
-
-  echo "unsupported feed: $FEED"
-  exit 1
-}
-
 ### OBS build
 prepare() {
   # start with a checkout of the project
@@ -259,5 +246,5 @@
   osc ci -m "$FEED versions of $DT" --noservice
 }
 
-verify_feed
+osmo_obs_verify_feed
 build_osmocom
diff --git a/scripts/osmocom-nightly-packages.sh b/scripts/osmocom-nightly-packages.sh
index ef2d7ef..62528c2 100755
--- a/scripts/osmocom-nightly-packages.sh
+++ b/scripts/osmocom-nightly-packages.sh
@@ -11,6 +11,11 @@
 . "$(dirname "$0")/common.sh"
 . "$(dirname "$0")/common-obs.sh"
 
+FEEDS="
+  next
+  nightly
+"
+
 set -e
 set -x
 
@@ -19,11 +24,6 @@
 TOP=$(pwd)/$(mktemp -d nightly-3g_XXXXXX)
 FEED="${FEED:-nightly}"
 
-if [ "$FEED" != "nightly" ] && [ "$FEED" != "next" ]; then
-  echo "unsupported feed: $FEED"
-  exit 1
-fi
-
 ### OBS build
 prepare() {
   # clean up the whole space
@@ -269,4 +269,5 @@
   post
 }
 
+osmo_obs_verify_feed
 build_osmocom

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/24254
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I91e4c36d4a04d465fc9ccb933e8060511b7cd145
Gerrit-Change-Number: 24254
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210518/ca7db745/attachment.htm>


More information about the gerrit-log mailing list