mirror of https://gerrit.osmocom.org/osmo-ci
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
This commit is contained in:
parent
3c31513bcc
commit
e660339f2e
|
@ -26,7 +26,8 @@
|
|||
description: osmo-ci.git branch
|
||||
default: 'refs/remotes/origin/master'
|
||||
builders:
|
||||
- shell:
|
||||
- shell: |
|
||||
export PROJ=network:osmocom:{type}
|
||||
./scripts/osmocom-{type}-packages.sh
|
||||
scm:
|
||||
- git:
|
||||
|
|
|
@ -15,6 +15,10 @@ osmo_cmd_require \
|
|||
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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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 @@ set -x
|
|||
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() {
|
||||
|
@ -286,5 +276,4 @@ build_osmocom() {
|
|||
post
|
||||
}
|
||||
|
||||
parse_feed_proj
|
||||
build_osmocom
|
||||
|
|
Loading…
Reference in New Issue