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.orgosmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/23949 )
Change subject: OBS: require PROJ environment variable to be set
......................................................................
OBS: require PROJ environment variable to be set
Uploading to network:osmocom:* should only be done when these scripts
are running in the Osmocom jenkins. Remove the default and require users
of the script to explicitly set PROJ.
Related: SYS#5370
Change-Id: If49ce217e77716b63dfde9139e869672a54b66a2
---
M jobs/osmocom-obs.yml
M scripts/common-obs.sh
M scripts/osmocom-latest-packages.sh
M scripts/osmocom-nightly-packages.sh
4 files changed, 14 insertions(+), 21 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/49/23949/1
diff --git a/jobs/osmocom-obs.yml b/jobs/osmocom-obs.yml
index 4d165d6..6562745 100644
--- a/jobs/osmocom-obs.yml
+++ b/jobs/osmocom-obs.yml
@@ -27,6 +27,7 @@
default: 'refs/remotes/origin/master'
builders:
- shell:
+ export PROJ=network:osmocom:{type}
./scripts/osmocom-{type}-packages.sh
scm:
- git:
diff --git a/scripts/common-obs.sh b/scripts/common-obs.sh
index 38719c8..c5b03f9 100644
--- a/scripts/common-obs.sh
+++ b/scripts/common-obs.sh
@@ -15,6 +15,10 @@
sed \
wget
+if [ -z "$PROJ" ]; then
+ echo "PROJ environment variable is not set"
+ exit 1
+fi
# Add dependency to all (sub)packages in debian/control and commit the change.
# $1: path to debian/control file
diff --git a/scripts/osmocom-latest-packages.sh b/scripts/osmocom-latest-packages.sh
index 8eef259..605023c 100755
--- a/scripts/osmocom-latest-packages.sh
+++ b/scripts/osmocom-latest-packages.sh
@@ -1,14 +1,13 @@
#!/bin/sh
# Generate source packages and upload them to OBS, for the latest feed.
+# Environment variables:
+# * PROJ: the OBS namespace to upload to (e.g. network:osmocom:latest)
. "$(dirname "$0")/common.sh"
. "$(dirname "$0")/common-obs.sh"
set -e
set -x
-# OBS project name
-PROJ=network:osmocom:latest
-
DT=$(date +%Y%m%d%H%M)
TOP=$(pwd)
DEBSRCDIR="$TOP/debsrc"
diff --git a/scripts/osmocom-nightly-packages.sh b/scripts/osmocom-nightly-packages.sh
index 706d786..5d37763 100755
--- a/scripts/osmocom-nightly-packages.sh
+++ b/scripts/osmocom-nightly-packages.sh
@@ -1,7 +1,8 @@
#!/bin/bash
# Generate source packages and upload them to OBS, for the nightly or next feed.
# Environment variables:
-# * FEED: the binary package feed to upload to, this also controls the source branch that is used:
+# * PROJ: the OBS namespace to upload to (e.g. network:osmocom:nightly)
+# * FEED: controls the source branch that is used:
# * "nightly": use "master" branch (default)
# * "next": use "next" branch if it exists, otherwise use "master" branch
. "$(dirname "$0")/common.sh"
@@ -13,23 +14,12 @@
DT=$(date +%Y%m%d%H%M)
OSMO_OBS_CONFLICT_PKGVER="$OSMO_OBS_CONFLICT_PKGVER.$DT"
TOP=$(pwd)/$(mktemp -d nightly-3g_XXXXXX)
+FEED="${FEED:-nightly}"
-# Set FEED and PROJ, based on the FEED env var
-parse_feed_proj() {
- FEED="${FEED:-nightly}"
- case "$FEED" in
- nightly)
- PROJ=network:osmocom:nightly
- ;;
- next)
- PROJ=network:osmocom:next
- ;;
- *)
- echo "unsupported feed: $FEED"
- exit 1
- ;;
- esac
-}
+if [ "$FEED" != "nightly" ] && [ "$FEED" != "next" ]; then
+ echo "unsupported feed: $FEED"
+ exit 1
+fi
### OBS build
prepare() {
@@ -284,5 +274,4 @@
post
}
-parse_feed_proj
build_osmocom
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/23949
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: If49ce217e77716b63dfde9139e869672a54b66a2
Gerrit-Change-Number: 23949
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/20210428/1062ff21/attachment.htm>